• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/engine/autowire/parameter.php
  • Класс: BitrixMainEngineAutoWireParameter
  • Вызов: Parameter::captureData
public function captureData(ReflectionParameter $parameter, array $sourceParameters, array $autoWiredParameters = [])
{
	if (!$this->needToMapExternalData())
	{
		return new Result();
	}

	$result = new Result();
	$externalName = $this->generateExternalName($parameter);
	$value = $this->findParameterInSourceList($externalName, $sourceParameters, $status);

	if ($status === Binder::STATUS_NOT_FOUND)
	{
		$result->addError(new Error("Could not find value for {{$externalName}}"));
	}
	else
	{
		$result->setData([
			$value
		]);
	}

	return $result;
}