PHPDaemon\Clients\GearmanClient\Connection::sendCommand PHP Метод

sendCommand() публичный Метод

Send a command
public sendCommand ( $commandName, $payload, callable $cb = null )
$commandName
$payload
$cb callable = null
    public function sendCommand($commandName, $payload, $cb = null)
    {
        $pct = implode(static::ARGS_DELIMITER, array_map(function ($item) {
            return !is_scalar($item) ? serialize($item) : $item;
        }, (array) $payload));
        $this->onResponse->push($cb);
        $this->write(pack(static::HEADER_WRITE_FORMAT, static::MAGIC_REQUEST, $this->requestCommandList[$commandName], mb_orig_strlen($pct)));
        $this->write($pct);
    }