protected function constructorInjection($className, array $arguments = [], $constructor = null)
    {
        // Check for passed constructor or retrieve it
        if (null === $constructor) {
            $constructor = self::parseConstructor($this->getReflection());
        }

        // If not the default (__constructor) it must be static and so turn into array
        if (Doozr_Di_Constants::CONSTRUCTOR_METHOD !== $constructor) {
            $className = [$className, $constructor];
        }

        return $this->construct($className, $arguments);
    }
protected function constructorInjection($className, array $arguments = [], $constructor = null)
    {
        // Check for passed constructor or retrieve it
        if (null === $constructor) {
            $constructor = self::parseConstructor($this->getReflection());
        }

        // If not the default (__constructor) it must be static and so turn into array
        if (Doozr_Di_Constants::CONSTRUCTOR_METHOD !== $constructor) {
            $className = [$className, $constructor];
        }

        return $this->construct($className, $arguments);
    }
protected function constructorInjection ( $ className , array $ arguments = [ ] , $ constructor = null ) { // Check for passed constructor or retrieve it if ( null === $ constructor ) { $ constructor = self :: parseConstructor ( $ this -> getReflection ( ) ) ; } // If not the default (__constructor) it must be static and so turn into array if ( Doozr_Di_Constants :: CONSTRUCTOR_METHOD !== $ constructor ) { $ className = [ $ className , $ constructor ] ; } return $ this -> construct ( $ className , $ arguments ) ; }
Returns an instance with injected dependencies.

This method is intend to return an instance of the given class. It injects
the required dependencies into constructor on instantiation.

@param string $className   Name of the class being instantiated
@param array  $arguments   Arguments to pass to constructor when creating instance of $className
@param string $constructor Constructor used as priority 1 when not directly instantiable.

@author Benjamin Carl <opensource@clickalicious.de>

@return object The new created instance
Returns an instance with injected dependencies .