• Модуль: transformer
  • Путь к файлу: ~/bitrix/modules/transformer/lib/command.php
  • Класс: BitrixTransformerCommand
  • Вызов: Command::send
public function send(Http $http)
{
	if($this->status != self::STATUS_CREATE)
	{
		throw new InvalidOperationException('command should be in status '.self::getStatusText(self::STATUS_CREATE));
	}
	if(empty($this->guid))
	{
		throw new InvalidOperationException('command should be saved before send');
	}
	$result = new Result();
	$response = $http->query($this->command, $this->guid, $this->params);
	if($response && $response['success'] !== false)
	{
		$this->updateStatus(self::STATUS_SEND);
		$result->setData(['commandId' => $this->id]);
	}
	else
	{
		$result = $this->processError($response['result']['code'], $response['result']['msg']);
	}
	return $result;
}