John,obviously, a shell doesn't have different request methods like the web has with HTTP (GET => read, POST => write, and so on). That means that by default, it runs with request method "read", so you'd have to implement executeRead() (or simply execute(), to catch all request methods) in the Action. However, I wouldn't recommend that if your Action is modifying data or anything; instead, force a request method through routing.xml by setting the "method" attribute on the <route> to, for instance, "write".
Hope that helps, - David On 08.02.2009, at 12:57, John Schmidt wrote:
hi veikko, thanks a lot for the answer. i checked out the sample app in the 1.0 branch.i created a console.php and modified factories.xml, output_types.xml androuting.xml accordingly.when i call console.php via CLI the correct action is called and the viewdeclared with 'getDefaultViewName()' gives me some output via 'executeText()'. i am wondering though how i can catch a console request in the action.just like i can catch post variables with 'executeWrite()' i should be ableto catch a console request, no? i read something about 'executeConsole()' but this doesnt do it.any idea what i can do to catch console requests in actions or what i didwrong? cheers, john -----Original Message-----From: [email protected] [mailto:[email protected] ]On Behalf Of Veikko Mäkinen Sent: Sonntag, 8. Februar 2009 11:32 To: Agavi Users Mailing List Subject: Re: [Agavi-Users] Secure cronjob | Best practice John Schmidt wrote:i thought about executing an action via the console but it didnt find alot of documentation in this matter.The sample application in SVN branches/1.0 has console features youcould check out. That would certainly be the best and cleanest solution.Executing the action with wget and hacking some security into this is something I would not recommend. -veikko -- Veikko Mäkinen [email protected] 044 5910 413 http://blog.veikko.fi _______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users _______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
