• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/engine/crawler.php
  • Класс: BitrixMainEngineCrawler
  • Вызов: Crawler::getActionsFromControllers
private function getActionsFromControllers($namespace)
{
	$actions = array();
	foreach ($this->getFilesUnderNamespace($namespace) as $className)
	{
		try
		{
			$reflectionClass = new ReflectionClass($className);
			if ($reflectionClass->isAbstract())
			{
				continue;
			}

			$classNamespace = mb_strtolower(trim($reflectionClass->getNamespaceName(), '\'));
			$namespace = mb_strtolower(trim($namespace, '\'));

			if (strpos($classNamespace, $namespace) === false)
			{
				continue;
			}

			if (!$reflectionClass->isSubclassOf(Controller::className()))
			{
				continue;
			}

			$controllerName = strtr($reflectionClass->getName(), '\', '.');
			$controllerName = mb_strtolower($controllerName);

			$controller = $this->constructController($reflectionClass);
			foreach ($controller->listNameActions() as $actionName)
			{
				$actions[] = $controllerName.'.'.mb_strtolower($actionName);
			}
		}
		catch (ReflectionException $exception)
		{}
	}

	return $actions;
}