PHPDocMD\Parser::parseProperties PHP Method

parseProperties() protected method

You must pass an xml element that refers to either the class or interface element from structure.xml.
protected parseProperties ( SimpleXMLElement $class ) : array
$class SimpleXMLElement
return array
    protected function parseProperties(SimpleXMLElement $class)
    {
        $properties = [];
        $className = (string) $class->full_name;
        $className = ltrim($className, '\\');
        foreach ($class->property as $xProperty) {
            $type = 'mixed';
            $propName = (string) $xProperty->name;
            $default = (string) $xProperty->default;
            $xVar = $xProperty->xpath('docblock/tag[@name="var"]');
            if (count($xVar)) {
                $type = $xVar[0]->type;
            }
            $visibility = (string) $xProperty['visibility'];
            $signature = sprintf('%s %s %s', $visibility, $type, $propName);
            if ($default) {
                $signature .= ' = ' . $default;
            }
            $properties[$propName] = ['name' => $propName, 'type' => $type, 'default' => $default, 'description' => (string) $xProperty->docblock->description . "\n\n" . (string) $xProperty->docblock->{'long-description'}, 'visibility' => $visibility, 'static' => (string) $xProperty['static'] == 'true', 'signature' => $signature, 'deprecated' => count($class->xpath('docblock/tag[@name="deprecated"]')) > 0, 'definedBy' => $className];
        }
        return $properties;
    }