Zend\Code\Scanner\ClassScanner::getPropertyNames PHP Method

getPropertyNames() public method

Return a list of property names
public getPropertyNames ( ) : array
return array
    public function getPropertyNames()
    {
        $this->scan();
        $return = [];
        foreach ($this->infos as $info) {
            if ($info['type'] != 'property') {
                continue;
            }
            $return[] = $info['name'];
        }
        return $return;
    }

Usage Example

 /**
  * Return a list of property names
  *
  * @return array
  */
 public function getPropertyNames()
 {
     $properties = $this->classScanner->getPropertyNames();
     foreach ($this->parentClassScanners as $pClassScanner) {
         $properties = array_merge($properties, $pClassScanner->getPropertyNames());
     }
     return $properties;
 }