private function _instantiate(BeanDefinition $definition)
    {
        if ($definition->isCreatedByConstructor()) {
            return $this->_instantiateByConstructor($definition);
        } else if ($definition->isCreatedWithFactoryBean()) {
            return $this->_instantiateByFactoryBean($definition);
        } else {
            return $this->_instantiateByFactoryClass($definition);
        }
    }
private function _instantiate(BeanDefinition $definition)
    {
        if ($definition->isCreatedByConstructor()) {
            return $this->_instantiateByConstructor($definition);
        } else if ($definition->isCreatedWithFactoryBean()) {
            return $this->_instantiateByFactoryBean($definition);
        } else {
            return $this->_instantiateByFactoryClass($definition);
        }
    }
private function _instantiate ( BeanDefinition $ definition ) { if ( $ definition -> isCreatedByConstructor ( ) ) { return $ this -> _instantiateByConstructor ( $ definition ) ; } else if ( $ definition -> isCreatedWithFactoryBean ( ) ) { return $ this -> _instantiateByFactoryBean ( $ definition ) ; } else { return $ this -> _instantiateByFactoryClass ( $ definition ) ; } }
Instantiates a bean.

@param BeanDefinition $definition

@return object
Instantiates a bean .