• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/integration/internalizer.php
  • Класс: BitrixRestIntegrationInternalizer
  • Вызов: Internalizer::process
public function process()
{
	$r = new Result();

	$arguments = $this->getArguments();

	if(in_array(self::TO_SNAKE, $this->format))
	{
		$arguments = $this->convertToSnakeCase($arguments);
	}

	if(in_array(self::CHECK_REQUIRED, $this->format))
	{
		$check = $this->check($arguments);
		if(!$check->isSuccess())
		{
			$r->addErrors($check->getErrors());
		}
	}

	if($r->isSuccess())
	{
		if(in_array(self::TO_WHITE_LIST, $this->format))
		{
			$arguments = $this->internalize($arguments);
		}
	}

	return $r->setData(['data'=>$r->isSuccess()?$arguments:null]);
}