| 1 | <?php |
||
| 10 | class Events |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var Listener[] |
||
| 14 | */ |
||
| 15 | protected $listeners; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var Chart |
||
| 19 | */ |
||
| 20 | protected $chart; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Events constructor. |
||
| 24 | * |
||
| 25 | * @param Chart $chart |
||
| 26 | */ |
||
| 27 | 12 | public function __construct(Chart $chart) |
|
| 32 | |||
| 33 | /** |
||
| 34 | * Adds a listener. |
||
| 35 | * |
||
| 36 | * @param string $type Type of event |
||
| 37 | * @param string $functionName Name of Javascript function |
||
| 38 | */ |
||
| 39 | 3 | public function addListener($type, $functionName) |
|
| 47 | |||
| 48 | /** |
||
| 49 | * @return Listener[] |
||
| 50 | */ |
||
| 51 | 4 | public function getListeners() |
|
| 55 | } |
||
| 56 |