Re: Calling Controllers With Variables From The Command Line

2008-04-15 Thread pr1000
Grant, thank you for the solution. I have a new problem now, that I hope Grant or someone else could advise me on: the script hangs when called (e.g. "echo 'test' | php app/mailhandler.php") - specifically, when the dispatcher is called. My code is as follows: $raw_message = file_get_contents("ph

Re: Calling Controllers With Variables From The Command Line

2008-04-09 Thread Grant Cox
No, stick with the dispatcher. You can easily pass data just as a second parameter: $result = $Dispatcher->dispatch($url, array('cli'=>true, 'source'=> $mime_source)); then in your controller action you can just access $this->params['source'] to get the data passed. Let me guess, you're writi

Calling Controllers With Variables From The Command Line

2008-04-09 Thread pr1000
Hello everyone, I know this subject has been touched upon several times here, but I'm afraid I'm still looking for some guidance and would appreciate some help. Like others, I'm trying to call a controller from the command line. As suggested by some (e.g. http://bakery.cakephp.org/articles/view/c