| 1 | <?php |
||
| 8 | class NotifierExtension extends \Twig_Extension |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var \Twig_Environment |
||
| 12 | */ |
||
| 13 | protected $twig; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | protected $host; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | protected $apiKey; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Class constructor |
||
| 27 | * |
||
| 28 | * @param \Twig_Environment $twig |
||
| 29 | * @param string $host |
||
| 30 | * @param string $apiKey |
||
| 31 | */ |
||
| 32 | 4 | public function __construct(\Twig_Environment $twig, $host, $apiKey) |
|
| 38 | |||
| 39 | /** |
||
| 40 | * {@inheritDoc} |
||
| 41 | */ |
||
| 42 | 2 | public function getFunctions() |
|
| 54 | |||
| 55 | /** |
||
| 56 | * Returns the HTML that will be inserted by rendering the template |
||
| 57 | * |
||
| 58 | * @return string |
||
| 59 | */ |
||
| 60 | public function getErrbitNotifier() |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @return string |
||
| 73 | */ |
||
| 74 | 3 | public function getName() |
|
| 78 | } |
||
| 79 |