Return a list of properties
public getProperties ( ) : Zend\Code\Scanner\PropertyScanner[] | ||
Результат | Zend\Code\Scanner\PropertyScanner[] |
/** * @param bool $returnScannerProperty * @return array */ public function getProperties($returnScannerProperty = false) { $properties = $this->classScanner->getProperties($returnScannerProperty); foreach ($this->parentClassScanners as $pClassScanner) { $properties = array_merge($properties, $pClassScanner->getProperties($returnScannerProperty)); } return $properties; }
/** * @param ClassScanner $classScanner * @param ClassScanner[] $allClassScanners * @return array */ protected function processPropertiesAnnotations(ClassScanner $classScanner, array $allClassScanners) { $result = array(); /* @var $propertyScanner \Zend\Code\Scanner\PropertyScanner */ foreach ($classScanner->getProperties() as $propertyScanner) { $propertyArr = array(); foreach ($propertyScanner->getAnnotations($this->annotationManager) as $annotation) { if ($annotation instanceof Annotation\Column) { $propertyArr = array_merge($propertyArr, $this->handleColumn($annotation, $propertyScanner, $classScanner)); } else { if ($annotation instanceof Annotation\Id) { $propertyArr['primary'] = true; } else { if ($annotation instanceof Annotation\Criteria) { $propertyArr['criteria'] = true; } else { if ($annotation instanceof Annotation\OneToMany) { $propertyArr = array_merge($propertyArr, $this->handleOneToManyAnnotation($annotation, $propertyScanner, $classScanner, $allClassScanners)); } } } } } if (!empty($propertyArr)) { $result['properties'][] = $propertyArr; } } return $result; }