- Модуль: main
- Путь к файлу: ~/bitrix/modules/main/lib/orm/query/query.php
- Класс: Bitrix\Main\ORM\Query\Query
- Вызов: Query::__call
public function __call($method, $arguments)
{
// where and having proxies
if (substr($method, 0, 6) === 'having')
{
$method = str_replace('having', 'where', $method);
}
if (substr($method, 0, 5) === 'where')
{
if (method_exists($this->filterHandler, $method))
{
call_user_func_array(
[$this->filterHandler, $method],
$arguments
);
return $this;
}
}
if (substr($method, 0, 4) === 'with')
{
$dataClass = $this->entity->getDataClass();
if (method_exists($dataClass, $method))
{
// set query as first element
array_unshift($arguments, $this);
call_user_func_array(
[$dataClass, $method],
$arguments
);
return $this;
}
}
throw new Main\SystemException("Unknown method `{$method}`");
}