protected function solve($type, $name, array $args = array())
    {
        if(!$this->services[$type]->has($name))
        {
            if($type == 'callable' && $this->services['service']->has($name))
            {
                // then check on related invokable services
                $service = $this->get($name);

                // if service is invokable.
                if(is_callable($service))
                {
                    $this->invokables[$name] = $service;

                    return call_user_func_array($service, $args);
                }
            }

            throw new \Exedra\Exception\InvalidArgumentException('['.get_class($this).'] Unable to find ['.$name.'] registry as a registered '.$type .'.');
        }

        $registry = $this->services[$type]->get($name);

        return $this->filter($type, $name, $this->resolve($type, $name, $registry, $args));
    }
protected function solve($type, $name, array $args = array())
    {
        if(!$this->services[$type]->has($name))
        {
            if($type == 'callable' && $this->services['service']->has($name))
            {
                // then check on related invokable services
                $service = $this->get($name);

                // if service is invokable.
                if(is_callable($service))
                {
                    $this->invokables[$name] = $service;

                    return call_user_func_array($service, $args);
                }
            }

            throw new \Exedra\Exception\InvalidArgumentException('['.get_class($this).'] Unable to find ['.$name.'] registry as a registered '.$type .'.');
        }

        $registry = $this->services[$type]->get($name);

        return $this->filter($type, $name, $this->resolve($type, $name, $registry, $args));
    }
protected function solve ( $ type , $ name , array $ args = array ( ) ) { if ( ! $ this -> services [ $ type ] -> has ( $ name ) ) { if ( $ type == 'callable' && $ this -> services [ 'service' ] -> has ( $ name ) ) { // then check on related invokable services $ service = $ this -> get ( $ name ) ; // if service is invokable. if ( is_callable ( $ service ) ) { $ this -> invokables [ $ name ] = $ service ; return call_user_func_array ( $ service , $ args ) ; } } throw new \ Exedra \ Exception \ InvalidArgumentException ( '[' . get_class ( $ this ) . '] Unable to find [' . $ name . '] registry as a registered ' . $ type . '.' ) ; } $ registry = $ this -> services [ $ type ] -> get ( $ name ) ; return $ this -> filter ( $ type , $ name , $ this -> resolve ( $ type , $ name , $ registry , $ args ) ) ; }
Solve the given type of registry
@param string $type services|callables|factories
@param string $name
@param array $args
@return mixed
@throws \Exedra\Exception\InvalidArgumentException for failing to find in registry
Solve the given type of registry