public function getInstance(string $type, $name = null)
    {
        if (__CLASS__ === $type) {
            return $this;
        }

        array_push($this->injectionStack, $type . '#' . $name);
        $instance = $this->getBinding($type, $name)->getInstance($this, $name);
        array_pop($this->injectionStack);
        return $instance;
    }
public function getInstance(string $type, $name = null)
    {
        if (__CLASS__ === $type) {
            return $this;
        }

        array_push($this->injectionStack, $type . '#' . $name);
        $instance = $this->getBinding($type, $name)->getInstance($this, $name);
        array_pop($this->injectionStack);
        return $instance;
    }
public function getInstance ( string $ type , $ name = null ) { if ( __CLASS__ === $ type ) { return $ this ; } array_push ( $ this -> injectionStack , $ type . '#' . $ name ) ; $ instance = $ this -> getBinding ( $ type , $ name ) -> getInstance ( $ this , $ name ) ; array_pop ( $ this -> injectionStack ) ; return $ instance ; }
get an instance

@api
@param   string  $type
@param   string  $name
@return  object
get an instance