lithium\analysis\Docblock::_params()

protected static method

Parses @param docblock tags to separate out the parameter type from the description.

Parameters

  • array $params

    An array of @param tags, as parsed from the tags() method.

Returns

array

Returns an array where each key is a parameter name, and each value is an associative array containing 'type' and 'text' keys.

Source

	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;
	}