| 1 | <?php |
||
| 7 | class CallableAction implements ActionInterface |
||
| 8 | { |
||
| 9 | |||
| 10 | protected $messageCallable; |
||
| 11 | protected $connectCallable; |
||
| 12 | protected $tickCallable; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param callable $message_callable |
||
| 16 | * @param callable $connect_callable |
||
| 17 | * @param callable $tick_callable |
||
| 18 | */ |
||
| 19 | public function __construct($message_callable, $connect_callable, $tick_callable) |
||
| 25 | |||
| 26 | public function handleConnect(ConnectionInterface $connection) |
||
| 33 | |||
| 34 | public function handleMessage(MessageInterface $message) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Handle repeated function calls |
||
| 44 | * @param ConnectionInterface $connection |
||
| 45 | * @return void |
||
| 46 | */ |
||
| 47 | public function handleTick(ConnectionInterface $connection) |
||
| 54 | |||
| 55 | } |
||
| 56 |