public function grabServiceFromContainer($service, array $parameters = [])
    {
        if (!$this->di->has($service)) {
            $this->fail("Service $service is not available in container");
        }

        return $this->di->get($service, $parameters);
    }
public function grabServiceFromContainer($service, array $parameters = [])
    {
        if (!$this->di->has($service)) {
            $this->fail("Service $service is not available in container");
        }

        return $this->di->get($service, $parameters);
    }
public function grabServiceFromContainer ( $ service , array $ parameters = [ ] ) { if ( ! $ this -> di -> has ( $ service ) ) { $ this -> fail ( "Service $service is not available in container" ) ; } return $ this -> di -> get ( $ service , $ parameters ) ; }
Resolves the service based on its configuration from Phalcon's DI container
Recommended to use for unit testing.

@param string $service    Service name
@param array  $parameters Parameters [Optional]
@return mixed
@part services
Resolves the service based on its configuration from Phalcon s DI container Recommended to use for unit testing .