lithium\console\command\Help::_properties PHP Метод

_properties() защищенный Метод

Get the properties for the class.
protected _properties ( string $class, array $options = [] ) : array
$class string
$options array
Результат array
    protected function _properties($class, $options = array())
    {
        $defaults = array('name' => null);
        $options += $defaults;
        $properties = Inspector::properties($class);
        $results = array();
        foreach ($properties as &$property) {
            $name = str_replace('_', '-', Inflector::underscore($property['name']));
            $comment = Docblock::comment($property['docComment']);
            $description = trim($comment['description']);
            $type = isset($comment['tags']['var']) ? strtok($comment['tags']['var'], ' ') : null;
            $usage = strlen($name) == 1 ? "-{$name}" : "--{$name}";
            if ($type != 'boolean') {
                $usage .= "=<{$type}>";
            }
            $usage = "[{$usage}]";
            $results[$name] = compact('name', 'description', 'type', 'usage');
            if ($name == $options['name']) {
                return array($name => $results[$name]);
            }
        }
        return $results;
    }