Hi!<div><br><div>I just wanted to bring my question up again! Sorry when i am spamming. ;)</div><div><br></div><div>Kind regards</div><div><br>---<div><br><b>T<span style="font-size: x-small; ">homas</span> F<span style="font-size: x-small; ">RITZ</span></b><br>
<b><span style="font-size: x-small; ">web</span></b> <a href="http://fritzthomas.com/" target="_blank">http://fritzthomas.com</a><br><b><span style="font-size: x-small; ">twitter</span></b> <a href="http://twitter.com/thomasf" target="_blank">http://twitter.com/thomasf</a></div>
<div><br></div><div><br><div class="gmail_quote">2010/8/9 Thomas Fritz <span dir="ltr"><<a href="mailto:fritztho@gmail.com">fritztho@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">Hi!<div><br></div><div>I have ActionController which works just fine over Web and the CLI. I have added the CLI Request to the supportedRequestTypes Array of the Controller. For the Web Request i would like to use Fluid as my Templating Framework - which works. But when i call an action of this controller from the command line, the Framework correctly tells me that it can not find a template for this request. I understand that i can not use Fluid for CLI "Requests" but how can i then use the same controller with the same logic for different Request Types? What is the proposed way? I could check the class of $this->request, but i am not really happy with that.</div>
<div><br></div><div><br></div><div>Another question related to that: What is the proposed way when i have one or more ActionControllers for both Web and CLI Requests and i want to get input from the user. On Web Requests it is obvious - i create a Form and submit it, or passing them via GET Parameters - then i process the arguments in the called action, right?</div>
<div>In my case it is not possible to set the arguments when calling on the command line. I have to read from stdinput to get the arguments. So how can i create most compatible ActionControllers for both use cases / request types?</div>
<div>I thought of creating a special CLI Controller, get input from the user and then forward to the real controller action with the arguments via $this->forward(). Would you recommend that? How would you do that?</div>
<div><br></div><div><br>Kind regards<br></div></div></div></blockquote></div>
</div></div></div>