/** * {@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'])); } }
/** * {@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()); } }