Hi,
After studying the sample app some more, I've discovered:
factories.xml:
<ae:configuration context="console">
<request class="AgaviConsoleRequest" />
<response class="AgaviConsoleResponse" />
<routing class="AgaviConsoleRouting" />
<user class="AgaviSecurityUser" />
</ae:configuration>
output_types.xml:
<ae:configuration context="console">
<output_types default="console">
<output_type name="console" />
</output_types>
</ae:configuration>
routing.xml:
<ae:configuration context="console">
<routes>
<route pattern="^test(\s{abc:\w+})$" module="Public"
action="Index" />
</routes>
</ae:configuration>
validators Index.xml:
<validators>
<validator class="string">
<argument>abc</argument>
</validator>
</validators>
IndexView
public function executeConsole (AgaviRequestDataHolder $rd)
{
return 'abc: ' . $rd->getParameter('abc');
}
After modifying factories.xml I found that I was able to send parameters that
routing.xml would match, eg "php console.php test" however I can't for the life
of me get it to match "php console.php test def" and pass the parameter value
"def" to "abc"
Is there something I'm missing?
Begin forwarded message:
> From: Craig Fairhurst <[email protected]>
> Date: 11 January 2010 17:23:21 GMT
> To: [email protected]
> Subject: Interacting with Agavi from CLI
>
> Hi
>
> I'm wanting to implement command line tools with Agavi, could somebody show
> me what is needed to get started?
>
> I have a console defined in output_types.xml, the standard one from the
> sample app, see below:
> <ae:configuration context="console">
> <output_types default="text">
>
> <output_type name="text" />
>
> </output_types>
> </ae:configuration>
>
> I haven't got a clue how to proceed from here. Any advice/examples much
> appreciated.
Craig Fairhurst
Call +44 (0)1200 422 533
Fax +44 (0)1200 422 566
This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system. E-mail transmission cannot be guaranteed to be
secure or error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents of this
message, which arise as a result of e-mail transmission. If verification is
required please request a hard-copy version. Youds Media, 1a New Market St,
Clitheroe Lancashire BB7 2JW http://youds.com
_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users