private function getExpectedDependance() { $bean = new \org\equinox\ioc\BeanDefinition(); $bean->setId('dep'); $bean->setClassName('org\\equinox\\ioc\\componentScan\\package\\sub\\Dependance'); $bean->setScope(\org\equinox\ioc\BeanDefinition::SCOPE_SESSION); $bean->setInitMethod('init'); $bean->setLazyInit(false); // prop staticVal $property = new \org\equinox\ioc\ValueVariableProperty(); $property->setName("staticVal"); $property->setValue("125"); $bean->addProperty($property); // prop iniVal $property = new \org\equinox\ioc\ValueVariableProperty(); $property->setName("iniVal"); $property->setValue('${DB.url}'); $bean->addProperty($property); // setter insertValue() $setter = new \org\equinox\ioc\ValueSetterProperty(); $setter->setName("insertValue"); $setter->setValue('anotherVal'); $bean->addProperty($setter); return $bean; }
public function doVariableProperty(\org\equinox\ioc\BeanDefinition $bean, $propertyName) { $beanProperty = new \org\equinox\ioc\ValueVariableProperty(); $beanProperty->setName($propertyName); $beanProperty->setValue($this->getValue($bean, $propertyName)); $bean->addProperty($beanProperty); }