library/Garp/Cli.php
public static function makeHttpCall($uri) {
        $request = new Zend_Controller_Request_Http();
        $request->setRequestUri($uri);
        $application = Zend_Registry::get('application');
        $front = $application->getBootstrap()->getResource('FrontController');
        $default = $front->getDefaultModule();
        if (null === $front->getControllerDirectory($default)) {
            throw new Zend_Application_Bootstrap_Exception(
                'No default controller directory registered with front controller'
            );
        }
        $front->setParam('bootstrap', $application->getBootstrap());
        // Make sure we aren't blocked from the ContentController as per the rules in the ACL
        $front->unregisterPlugin('Garp_Controller_Plugin_Auth');
        // Make sure no output is rendered
        $front->returnResponse(true);

        $response = $front->dispatch($request);
        return $response;
    }
public static function makeHttpCall($uri) {
        $request = new Zend_Controller_Request_Http();
        $request->setRequestUri($uri);
        $application = Zend_Registry::get('application');
        $front = $application->getBootstrap()->getResource('FrontController');
        $default = $front->getDefaultModule();
        if (null === $front->getControllerDirectory($default)) {
            throw new Zend_Application_Bootstrap_Exception(
                'No default controller directory registered with front controller'
            );
        }
        $front->setParam('bootstrap', $application->getBootstrap());
        // Make sure we aren't blocked from the ContentController as per the rules in the ACL
        $front->unregisterPlugin('Garp_Controller_Plugin_Auth');
        // Make sure no output is rendered
        $front->returnResponse(true);

        $response = $front->dispatch($request);
        return $response;
    }
public static function makeHttpCall ( $ uri ) { $ request = new Zend_Controller_Request_Http ( ) ; $ request -> setRequestUri ( $ uri ) ; $ application = Zend_Registry :: get ( 'application' ) ; $ front = $ application -> getBootstrap ( ) -> getResource ( 'FrontController' ) ; $ default = $ front -> getDefaultModule ( ) ; if ( null === $ front -> getControllerDirectory ( $ default ) ) { throw new Zend_Application_Bootstrap_Exception ( 'No default controller directory registered with front controller' ) ; } $ front -> setParam ( 'bootstrap' , $ application -> getBootstrap ( ) ) ; // Make sure we aren't blocked from the ContentController as per the rules in the ACL $ front -> unregisterPlugin ( 'Garp_Controller_Plugin_Auth' ) ; // Make sure no output is rendered $ front -> returnResponse ( true ) ; $ response = $ front -> dispatch ( $ request ) ; return $ response ; }
For some functionality you absolutely need an HTTP context.
This method mimics a standard Zend request.

@param string $uri
@return string The response body
For some functionality you absolutely need an HTTP context . This method mimics a standard Zend request .