Ding\Container\Impl\ContainerImpl::_assemble PHP Method

_assemble() private method

Assembles a bean (setter injection)
private _assemble ( mixed $bean, Ding\Bean\BeanDefinition $beanDefinition ) : void
$bean mixed
$beanDefinition Ding\Bean\BeanDefinition
return void
    private function _assemble($bean, BeanDefinition $beanDefinition)
    {
        $this->_lifecycleManager->beforeAssemble($bean, $beanDefinition);
        foreach ($beanDefinition->getProperties() as $property) {
            $propertyName = $property->getName();
            $propertyValue = $this->_getValueFromDefinition($property);
            if ($this->_setterInject($bean, $propertyName, $propertyValue) || $this->_propertyInject($bean, $propertyName, $propertyValue) || $this->_nonSetterMethodInject($bean, $propertyName, $propertyValue)) {
                continue;
            }
            throw new BeanFactoryException("Dont know how to inject: {$propertyName}");
        }
        $this->fillAware($beanDefinition, $bean);
        $this->_lifecycleManager->afterAssemble($bean, $beanDefinition);
    }