1 | <?php |
||
15 | class Pool extends AppInstance |
||
16 | { |
||
17 | /** |
||
18 | * @var Pool |
||
19 | */ |
||
20 | public $pool; |
||
21 | |||
22 | /** |
||
23 | * Setting default config options |
||
24 | * Overriden from AppInstance::getConfigDefaults |
||
25 | * Uncomment and return array with your default options |
||
26 | * @return boolean |
||
27 | */ |
||
28 | protected function getConfigDefaults() |
||
32 | |||
33 | /** |
||
34 | * Constructor. |
||
35 | * @return void |
||
36 | */ |
||
37 | protected function init() |
||
59 | |||
60 | /** |
||
61 | * Function handles incoming Remote Procedure Calls |
||
62 | * You can override it |
||
63 | * @param string $method Method name. |
||
64 | * @param array $args Arguments. |
||
65 | * @return mixed Result |
||
66 | */ |
||
67 | public function RPCall($method, $args) |
||
74 | |||
75 | /** |
||
76 | * Called when the worker is ready to go. |
||
77 | * @return void |
||
78 | */ |
||
79 | public function onReady() |
||
85 | |||
86 | /** |
||
87 | * Called when worker is going to update configuration. |
||
88 | * @return void |
||
89 | */ |
||
90 | public function onConfigUpdated() |
||
97 | |||
98 | /** |
||
99 | * Called when application instance is going to shutdown. |
||
100 | * @return boolean Ready to shutdown? |
||
101 | */ |
||
102 | public function onShutdown($graceful = false) |
||
109 | } |
||
110 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.