1 | <?php |
||
11 | class Pool extends AppInstance |
||
12 | { |
||
13 | /** |
||
14 | * @var Pool |
||
15 | */ |
||
16 | public $pool; |
||
17 | |||
18 | /** |
||
19 | * Function handles incoming Remote Procedure Calls |
||
20 | * You can override it |
||
21 | * @param string $method Method name. |
||
22 | * @param array $args Arguments. |
||
23 | * @return mixed Result |
||
24 | */ |
||
25 | public function RPCall($method, $args) |
||
32 | |||
33 | /** |
||
34 | * Called when the worker is ready to go. |
||
35 | * @return void |
||
36 | */ |
||
37 | public function onReady() |
||
43 | |||
44 | /** |
||
45 | * Called when worker is going to update configuration. |
||
46 | * @return void |
||
47 | */ |
||
48 | public function onConfigUpdated() |
||
55 | |||
56 | /** |
||
57 | * Called when application instance is going to shutdown. |
||
58 | * @return boolean Ready to shutdown? |
||
59 | */ |
||
60 | public function onShutdown($graceful = false) |
||
67 | |||
68 | /** |
||
69 | * Setting default config options |
||
70 | * Overriden from AppInstance::getConfigDefaults |
||
71 | * Uncomment and return array with your default options |
||
72 | * @return boolean |
||
73 | */ |
||
74 | protected function getConfigDefaults() |
||
78 | |||
79 | /** |
||
80 | * Constructor. |
||
81 | * @return void |
||
82 | */ |
||
83 | protected function init() |
||
106 | } |
||
107 |