Resque\Socket\Server::fire PHP Method

fire() public method

Raise a given event with the supplied data.
public fire ( string $event, Client &$client, mixed $data = null ) : true
$event string Name of event to be raised.
$client Client Connected client
$data mixed Optional, any data that should be passed to each callback.
return true
    public function fire($event, &$client, $data = null)
    {
        $retval = true;
        if (!array_key_exists($event, $this->events)) {
            return;
        }
        foreach ($this->events[$event] as $callback) {
            if (!is_callable($callback)) {
                continue;
            }
            if (($retval = call_user_func($callback, $this, $client, $data)) === false) {
                break;
            }
        }
        return $retval !== false;
    }