Neos\Flow\Reflection\PropertyReflection::getDeclaringClass PHP Méthode

getDeclaringClass() public méthode

Returns the declaring class
public getDeclaringClass ( ) : ClassReflection
Résultat ClassReflection The declaring class
    public function getDeclaringClass()
    {
        return new ClassReflection(parent::getDeclaringClass()->getName());
    }

Usage Example

Exemple #1
0
 /**
  * @param string $className
  * @param PropertyReflection $property
  * @param string $tagName
  * @param array $tagValues
  * @return array
  */
 protected function reflectPropertyTag($className, PropertyReflection $property, $tagName, $tagValues)
 {
     if ($this->isTagIgnored($tagName)) {
         return null;
     }
     if ($tagName !== 'var' || !isset($tagValues[0])) {
         return $tagValues;
     }
     $propertyName = $property->getName();
     $propertyDeclaringClass = $property->getDeclaringClass();
     if ($propertyDeclaringClass->getName() !== $className && isset($this->classReflectionData[$propertyDeclaringClass->getName()][self::DATA_CLASS_PROPERTIES][$propertyName][self::DATA_PROPERTY_TAGS_VALUES][$tagName])) {
         $tagValues = $this->classReflectionData[$propertyDeclaringClass->getName()][self::DATA_CLASS_PROPERTIES][$propertyName][self::DATA_PROPERTY_TAGS_VALUES][$tagName];
     } else {
         $tagValues[0] = $this->expandType($propertyDeclaringClass, $tagValues[0]);
     }
     return $tagValues;
 }