lithium\console\command\Help::api()
Gets the API for the class.
Parameters
-
string
$class
fully namespaced class in dot notation.
-
string
$type
method|property
-
string
$name
the name of the method or property.
Returns
arraySource
public function api($class = null, $type = null, $name = null) {
$class = str_replace(".", "\\", $class);
switch ($type) {
default:
$info = Inspector::info($class);
$result = ['class' => [
'name' => $info['shortName'],
'description' => trim($info['description'] . PHP_EOL . PHP_EOL . $info['text'])
]];
break;
case 'method':
$result = $this->_methods($class, compact('name'));
break;
case 'property':
$result = $this->_properties($class, compact('name'));
break;
}
$this->_render($result);
}