• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/classes/general/rest.php
  • Класс: CRestServer
  • Вызов: CRestServer::getMethodCallback
private function getMethodCallback()
{
	$methodDescription = $this->getMethodDescription();

	if($methodDescription)
	{
		$callback = isset($methodDescription['callback'])
			? $methodDescription['callback']
			: $methodDescription;

		// hack to prevent callback structure doubling in case of strange doubling of event handlers
		if(!is_callable($callback) && is_array($callback) && count($callback) > 2)
		{
			$callback = array($callback[0], $callback[1]);
		}

		if(is_callable($callback))
		{
			return $callback;
		}
	}

	return false;
}