• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/annotations/annotationreader.php
  • Класс: BitrixMainAnnotationsAnnotationReader
  • Вызов: AnnotationReader::getMethodAnnotations
public function getMethodAnnotations(ReflectionMethod $method)
{
	$doc = $method->getDocComment();

	preg_match_all("/@(?=(.*)[ ]*(?:@|rn|n))/U", $doc, $matches);

	if (!$matches)
	{
		return null;
	}

	$annotations = array();
	foreach ($matches[1] as $match)
	{
		if ($this->collectRules & self::RULE_FIRST_CAPITAL_LETTER)
		{
			if ($match !== ucfirst($match))
			{
				continue;
			}
		}

		$annotations[] = $match;
	}

	$parameters = array();
	foreach ($annotations as $annotation)
	{
		preg_match("/(w+)(?:((.*)))?/", $annotation, $matches);
		if ($matches)
		{
			$parameters[$matches[1]] = $this->extractParameters($matches[2]);
		}
	}

	return $parameters;
}