• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/engine/controller.php
  • Класс: BitrixMainEngineController
  • Вызов: Controller::create
protected function create($actionName)
{
	$config = $this->getActionConfig($actionName);
	$methodName = $this->generateActionMethodName($actionName);

	if (method_exists($this, $methodName))
	{
		$method = new ReflectionMethod($this, $methodName);
		if ($method->isPublic() && mb_strtolower($method->getName()) === mb_strtolower($methodName))
		{
			return new InlineAction($actionName, $this, $config);
		}
	}
	else
	{
		if (!$config && ($this instanceof ContractFallbackActionInterface))
		{
			return new FallbackAction($actionName, $this, []);
		}
		if (!$config)
		{
			throw new SystemException(
				"Could not find description of {$actionName} in {$this::className()}",
				self::EXCEPTION_UNKNOWN_ACTION
			);
		}

		return $this->buildActionInstance($actionName, $config);
	}

	return null;
}