PHP Класс lithium\analysis\Docblock

This parser may be used as the basis for a variety of secondary tools, including a reflection-based API generator, a code metrics analyzer, and various other possible use cases.
Наследование: extends lithium\core\StaticObject
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$tags array List of supported docblock tags.

Открытые методы

Метод Описание
comment ( string $comment ) : array Parses a doc block into its major components of description, text and tags.
tags ( string $string ) : array Parses @ docblock tags and their descriptions from a docblock.

Защищенные методы

Метод Описание
_params ( array $params ) : array Parses @param docblock tags to separate out the parameter type from the description.

Описание методов

_params() защищенный статический Метод

Parses @param docblock tags to separate out the parameter type from the description.
protected static _params ( array $params ) : array
$params array An array of `@param` tags, as parsed from the `tags()` method.
Результат array Returns an array where each key is a parameter name, and each value is an associative array containing `'type'` and `'text'` keys.

comment() публичный статический Метод

Parses a doc block into its major components of description, text and tags.
public static comment ( string $comment ) : array
$comment string The doc block string to be parsed
Результат array An associative array of the parsed comment, whose keys are `description`, `text` and `tags`.

tags() публичный статический Метод

See the $tags property for the list of supported tags.
public static tags ( string $string ) : array
$string string The string to be parsed for tags
Результат array Returns an array where each docblock tag is a key name, and the corresponding values are either strings (if one of each tag), or arrays (if multiple of the same tag).

Описание свойств

$tags публичное статическое свойство

List of supported docblock tags.
public static array $tags
Результат array