1 | <?php |
||
30 | class Resource extends Response |
||
31 | { |
||
32 | /** |
||
33 | * @var array |
||
34 | */ |
||
35 | protected $listeners = []; |
||
36 | |||
37 | /** |
||
38 | * @var AriClient |
||
39 | */ |
||
40 | protected $client; |
||
41 | |||
42 | /** |
||
43 | * @param string $event |
||
44 | * @param callable $listener |
||
45 | */ |
||
46 | 3 | public function on($event, callable $listener) |
|
51 | |||
52 | /** |
||
53 | * @param string $event |
||
54 | * @param callable $listener |
||
55 | */ |
||
56 | public function once($event, callable $listener) |
||
66 | |||
67 | /** |
||
68 | * @param string $event |
||
69 | * @param callable $listener |
||
70 | */ |
||
71 | 2 | public function removeListener($event, callable $listener) |
|
80 | |||
81 | /** |
||
82 | * @param string $event |
||
83 | */ |
||
84 | 50 | public function removeAllListeners($event = null) |
|
98 | |||
99 | /** |
||
100 | * @param string $event |
||
101 | * @return array |
||
102 | */ |
||
103 | public function listeners($event) |
||
107 | |||
108 | /** |
||
109 | * @param AriClient $client |
||
110 | * @param string $response The raw json response response data from ARI |
||
111 | */ |
||
112 | 55 | public function __construct(AriClient $client, $response) |
|
118 | |||
119 | 50 | public function __destruct() |
|
123 | |||
124 | } |
||
125 |