public function getNode(Argument $argument) : Expr
    {
        $dependencyIndex = (string) $argument;
        if (! $this->injector instanceof ScriptInjector) {
            return $this->getDefault($argument);
        }
        try {
            $isSingleton = $this->injector->isSingleton($dependencyIndex);
        } catch (NotCompiled $e) {
            return $this->getDefault($argument);
        }
        $func = $isSingleton ? 'singleton' : 'prototype';
        $args = $this->getInjectionProviderParams($argument);
        $node = new Expr\FuncCall(new Expr\Variable($func), $args);

        return $node;
    }
public function getNode(Argument $argument) : Expr
    {
        $dependencyIndex = (string) $argument;
        if (! $this->injector instanceof ScriptInjector) {
            return $this->getDefault($argument);
        }
        try {
            $isSingleton = $this->injector->isSingleton($dependencyIndex);
        } catch (NotCompiled $e) {
            return $this->getDefault($argument);
        }
        $func = $isSingleton ? 'singleton' : 'prototype';
        $args = $this->getInjectionProviderParams($argument);
        $node = new Expr\FuncCall(new Expr\Variable($func), $args);

        return $node;
    }
public function getNode ( Argument $ argument ) : Expr { $ dependencyIndex = ( string ) $ argument ; if ( ! $ this -> injector instanceof ScriptInjector ) { return $ this -> getDefault ( $ argument ) ; } try { $ isSingleton = $ this -> injector -> isSingleton ( $ dependencyIndex ) ; } catch ( NotCompiled $ e ) { return $ this -> getDefault ( $ argument ) ; } $ func = $ isSingleton ? 'singleton' : 'prototype' ; $ args = $ this -> getInjectionProviderParams ( $ argument ) ; $ node = new Expr \ FuncCall ( new Expr \ Variable ( $ func ) , $ args ) ; return $ node ; }
Return on-demand dependency pull code for not compiled

@return Expr|Expr\FuncCall
Return on - demand dependency pull code for not compiled