lithium\analysis\Docblock::_params PHP Метод

_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.
    protected static function _params(array $params)
    {
        $result = array();
        foreach ($params as $param) {
            $param = explode(' ', $param, 3);
            $type = $name = $text = null;
            foreach (array('type', 'name', 'text') as $i => $key) {
                if (!isset($param[$i])) {
                    break;
                }
                ${$key} = $param[$i];
            }
            if ($name) {
                $result[$name] = compact('type', 'text');
            }
        }
        return $result;
    }