protected function sliceThroughContainer($traveler, $stack, string $stage)
    {
        [$name, $parameters] = $this->parseStageString($stage);
        $parameters          = \array_merge([$traveler, $stack], $parameters);
        $class               = null;

        if ($this->container->has($name)) {
            $class = $this->container->get($name);
        } elseif ($this->container instanceof FactoryContract) {
            $class = $this->container->resolve($name);
        } else {
            throw new RuntimeException(\sprintf('Class [%s] is not being managed by the container.', $name));
        }

        return $this->getInvoker()->call([$class, $this->method], $parameters);
    }
protected function sliceThroughContainer($traveler, $stack, string $stage)
    {
        [$name, $parameters] = $this->parseStageString($stage);
        $parameters          = \array_merge([$traveler, $stack], $parameters);
        $class               = null;

        if ($this->container->has($name)) {
            $class = $this->container->get($name);
        } elseif ($this->container instanceof FactoryContract) {
            $class = $this->container->resolve($name);
        } else {
            throw new RuntimeException(\sprintf('Class [%s] is not being managed by the container.', $name));
        }

        return $this->getInvoker()->call([$class, $this->method], $parameters);
    }
protected function sliceThroughContainer ( $ traveler , $ stack , string $ stage ) { [ $ name , $ parameters ] = $ this -> parseStageString ( $ stage ) ; $ parameters = \ array_merge ( [ $ traveler , $ stack ] , $ parameters ) ; $ class = null ; if ( $ this -> container -> has ( $ name ) ) { $ class = $ this -> container -> get ( $ name ) ; } elseif ( $ this -> container instanceof FactoryContract ) { $ class = $ this -> container -> resolve ( $ name ) ; } else { throw new RuntimeException ( \ sprintf ( 'Class [%s] is not being managed by the container.' , $ name ) ) ; } return $ this -> getInvoker ( ) -> call ( [ $ class , $ this -> method ] , $ parameters ) ; }
Resolve from container.

@param mixed  $traveler
@param mixed  $stack
@param string $stage

@throws \Viserio\Component\Contract\Routing\Exception\RuntimeException

@return mixed
Resolve from container .