Kraken\Channel\ChannelComposite::handlePushRequest PHP Метод

handlePushRequest() защищенный Метод

protected handlePushRequest ( string $name, string | Kraken\Channel\Protocol\ProtocolInterface $message, integer $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, float $timeout ) : boolean
$name string
$message string | Kraken\Channel\Protocol\ProtocolInterface
$flags integer
$success callable
$failure callable
$cancel callable
$timeout float
Результат boolean
    protected function handlePushRequest($name, $message, $flags = Channel::MODE_DEFAULT, callable $success = null, callable $failure = null, callable $cancel = null, $timeout = 0.0)
    {
        $statusArray = null;
        foreach ($this->buses as $channel) {
            $statusArray = $this->combine($statusArray, $channel->push($name, $message, $flags, $success, $failure, $cancel, $timeout), function ($in, $out) {
                return $in || $out;
            });
        }
        $statusArray = (array) $statusArray;
        $cnt = 0;
        $len = count($statusArray);
        foreach ($statusArray as $statusElement) {
            if ($statusElement === true) {
                $cnt++;
            }
        }
        $status = $cnt === $len;
        if ($status) {
            $this->emit('output', [$name, $message]);
        }
        return $status;
    }