コード例 #1
0
 /**
  * {@inheritdoc}
  * @throws PropertyDefinitionNotFoundException
  */
 public function resolveProperty(DefinitionAnalyzer $analyzer, ClassDefinition $classDefinition, \ReflectionProperty $reflectionProperty)
 {
     $propertyName = $reflectionProperty->getName();
     if ($classDefinition->hasProperty($propertyName)) {
         $classDefinition->getProperty($propertyName)->defineDependency(new ServiceReference($this->value['value']));
     }
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  * @throws PropertyDefinitionNotFoundException
  */
 public function analyze(DefinitionAnalyzer $analyzer, ClassDefinition $classDefinition, \ReflectionProperty $reflectionProperty)
 {
     $propertyName = $reflectionProperty->getName();
     // Set property metadata
     if ($classDefinition->hasProperty($propertyName)) {
         $classDefinition->getProperty($propertyName)->setIsPublic($reflectionProperty->isPublic())->setModifiers($reflectionProperty->getModifiers());
     }
 }