public function toConstructor(string $class, $name, InjectionPoints $injectionPoints = null, string $postConstruct = null) : self
    {
        if (\is_array($name)) {
            $name = $this->getStringName($name);
        }
        $this->untarget = null;
        $postConstructRef = $postConstruct ? new \ReflectionMethod($class, $postConstruct) : null;
        $this->bound = (new DependencyFactory)->newToConstructor(new \ReflectionClass($class), $name, $injectionPoints, $postConstructRef);
        $this->container->add($this);

        return $this;
    }
public function toConstructor(string $class, $name, InjectionPoints $injectionPoints = null, string $postConstruct = null) : self
    {
        if (\is_array($name)) {
            $name = $this->getStringName($name);
        }
        $this->untarget = null;
        $postConstructRef = $postConstruct ? new \ReflectionMethod($class, $postConstruct) : null;
        $this->bound = (new DependencyFactory)->newToConstructor(new \ReflectionClass($class), $name, $injectionPoints, $postConstructRef);
        $this->container->add($this);

        return $this;
    }
public function toConstructor ( string $ class , $ name , InjectionPoints $ injectionPoints = null , string $ postConstruct = null ) : self { if ( \ is_array ( $ name ) ) { $ name = $ this -> getStringName ( $ name ) ; } $ this -> untarget = null ; $ postConstructRef = $ postConstruct ? new \ ReflectionMethod ( $ class , $ postConstruct ) : null ; $ this -> bound = ( new DependencyFactory ) -> newToConstructor ( new \ ReflectionClass ( $ class ) , $ name , $ injectionPoints , $ postConstructRef ) ; $ this -> container -> add ( $ this ) ; return $ this ; }
Bind to constructor

@param string          $class           class name
@param string | array  $name            "varName=bindName,..." or [[$varName => $bindName],[$varName => $bindName]...]
@param InjectionPoints $injectionPoints injection points
@param string          $postConstruct   method name of initialization after all dependencies are injected*
Bind to constructor