- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/dispatcher.php
- Класс: BitrixTasksDispatcher
- Вызов: Dispatcher::getClasses
protected function getClasses()
{
if($this->rootNamespace == false)
{
throw new DispatcherException('Root namespace incorrect'); // paranoid disorder
}
$dir = __DIR__.static::DIRECTORY_TO_CALLABLE;
$result = array();
if(Directory::isDirectoryExists($dir))
{
$index = array();
static::walkDirectory($dir, $index, '');
if(is_array($index['FILE']))
{
foreach($index['FILE'] as $fileName)
{
$fileName = str_replace($dir, '', $fileName);
$fileName = explode('/', $fileName);
$query = array();
if(is_array($fileName))
{
foreach($fileName as $part)
{
if((string) $part !== '' || preg_match('#.php$#', $part))
{
$query[] = preg_replace('#.php$#', '', $part);
}
}
}
$result[] = array(
'ENTITY' => implode('.', $query),
'CLASS' => $this->rootNamespace.'\'.implode('\', array_map('ucfirst', $query))
);
}
}
}
return $result;
}