- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/dispatcher.php
- Класс: BitrixTasksDOES
- Вызов: DOES::execute
public function execute(array $batch)
{
$batch = $this->parseBatchDeprecated($batch);
$result = array();
if($this->errors->checkHasErrorOfType(static::ERROR_TYPE_PARSE))
{
throw new DispatcherBadQueryException(false);
}
// executing operations
/** @var Operation $operation */
foreach($batch as $operation)
{
// todo: break chain execution or continue when exception occured?
// todo: replace call() with execute() which will return Operation Result object, move all Task/Exception catches inside operation->execute()
$callResult = $this->wrapOpCall($operation);
$op = $operation->getOperation();
// todo: an object Result with ArrayAccess, getOperation(), getArguments(), etc would be more appropriate here
$result[$op['PARAMETERS']['CODE']] = array(
'OPERATION' => $op['OPERATION'],
'ARGUMENTS' => $op['ARGUMENTS'],
'RESULT' => $callResult,
'SUCCESS' => $operation->getErrors()->checkNoFatals(),
'ERRORS' => $operation->getErrors()->getAll(true, new Filter())
);
}
return $result;
}