protected function triggerHooks($command, Socket $client, $input = null)
    {
        if (isset($this->hooks[$command])) {
            foreach ($this->hooks[$command] as $callable) {
                $continue = call_user_func($callable, $this, $client, $input);

                if ($continue === self::RETURN_HALT_HOOK) {
                    break;
                }
                if ($continue === self::RETURN_HALT_SERVER) {
                    return false;
                }
                unset($continue);
            }
        }

        return true;
    }
protected function triggerHooks($command, Socket $client, $input = null)
    {
        if (isset($this->hooks[$command])) {
            foreach ($this->hooks[$command] as $callable) {
                $continue = call_user_func($callable, $this, $client, $input);

                if ($continue === self::RETURN_HALT_HOOK) {
                    break;
                }
                if ($continue === self::RETURN_HALT_SERVER) {
                    return false;
                }
                unset($continue);
            }
        }

        return true;
    }
protected function triggerHooks ( $ command , Socket $ client , $ input = null ) { if ( isset ( $ this -> hooks [ $ command ] ) ) { foreach ( $ this -> hooks [ $ command ] as $ callable ) { $ continue = call_user_func ( $ callable , $ this , $ client , $ input ) ; if ( $ continue === self :: RETURN_HALT_HOOK ) { break ; } if ( $ continue === self :: RETURN_HALT_SERVER ) { return false ; } unset ( $ continue ) ; } } return true ; }
Triggers the hooks for the supplied command.

@param string $command Hook to listen for (e.g. HOOK_CONNECT, HOOK_INPUT, HOOK_DISCONNECT, HOOK_TIMEOUT)
@param Socket $client
@param string $input   Message Sent along with the Trigger

@return bool Whether or not to continue running the server (true: continue, false: shutdown)
Triggers the hooks for the supplied command .