View Source

<ac:macro ac:name="note"><ac:parameter ac:name="title">Under Construction</ac:parameter><ac:rich-text-body>
<p>This proposal is under construction and is not ready for review.</p></ac:rich-text-body></ac:macro>

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template-instance:ZFDEV:Zend Proposal Zone Template}

{zone-data:component-name}
Zend_Controller_Request_Cli
{zone-data}

{zone-data:proposer-list}
[Matthew Weier O'Phinney|mailto:matthew@zend.com]
{zone-data}

{zone-data:revision}
0.9 - 2 February 2007: Initial proposal
{zone-data}

{zone-data:overview}
Zend_Controller_Request_Cli will integrate with Zend_Console_Getopt to provide a CLI request object for use with the MVC components. It will allow passing controller and action options to a CLI script, as well as any number of additional options.
{zone-data}

{zone-data:references}
* [Zend_Console_Getopt proposal|Zend_Console_Getopt - Bill Karwin]
{zone-data}

{zone-data:requirements}
* This component *will* allow specifying the option keys for the controller and action, but fall back to sane defaults
* This component *will* allow specifying any number of additional CLI options and capture them in the request
{zone-data}

{zone-data:dependencies}
* Zend_Console_Getopt
* Zend_Controller_Request_Abstract
* Zend_Controller_Request_Exception
{zone-data}

{zone-data:operation}
The component is initialized with a null constructor, and then passed to the front controller via either setRequest() or as the first argument to dispatch().
{zone-data}

{zone-data:milestones}
* Milestone 1: Finish proposal with sample code
* Milestone 2: Working prototype checked into the incubator
* Milestone 3: Unit tests exist, work, and are checked into SVN.
* Milestone 4: Initial documentation exists.
* Milestone 5: Promotion to core.
{zone-data}

{zone-data:class-list}
* Zend_Controller_Request_Cli
{zone-data}

{zone-data:use-cases}
||UC-01||
{code:php}
$request = new Zend_Controller_Request_Cli();
$front->dispatch($request);
{code}

||UC-02||
{code:php}
$front->setRequest(new Zend_Controller_Request_Cli());
{code}

||UC-03||
{code:php}
$request = new Zend_Controller_Request_Cli();
$controller = $request->getControllerName();
$action = $request->getActionName();
$params = $request->getParams();
{code}
{zone-data}

{zone-data:skeletons}
{code:php}
class Zend_Controller_Request_Cli extends Zend_Controller_Request_Abstract
{
}
{code}
{zone-data}

{zone-template-instance}]]></ac:plain-text-body></ac:macro>