use in a script:

sfContext::getInstance()->getController()->forward($module, $action);

instead of a call to dispatch()


On Apr 9, 2009, at 11:38 PM, Mark Smith wrote:

>
> I've stepped through with the debugger, and it seems to be set in the
> dispatch method of the controller:
>
>      $moduleName = $request->getParameter('module');
>      $actionName = $request->getParameter('action');
>
> So I guess my original question boils down to a more general php
> question: How do you set these paramaters from the command line?
>
> Thanks
>
> On Apr 9, 10:20 am, Gareth McCumskey <[email protected]> wrote:
>> We have a CLI that we run and we store it into the batch directory.  
>> At the
>> start we define a few things to help this seperate, CLI run, PHP  
>> script
>> initialise into the environment:
>>
>> define('SF_ROOT_DIR',    realpath(dirname(__FILE__).'/..'));
>> define('SF_APP',         'frontend');
>> define('SF_ENVIRONMENT', 'dev');
>> define('SF_DEBUG',       true);
>>
>> // Use the ProjectConfiguration class for configuration data
>> require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR
>>   . 'config' . DIRECTORY_SEPARATOR
>>   . 'ProjectConfiguration.class.php');
>>
>> You may need to create a "wrapper" batch script with the code above  
>> that
>> will then call the module/action you want.
>>
>> Perhaps someone else can clear up how to do this
>>
>> On Thu, Apr 9, 2009 at 10:07 AM, Mark Smith <marksmith5...@jungle- 
>> monkey.com
>>
>>> wrote:
>>
>>> I can trigger the front end by running "php web\index.php"
>>
>>> But if I try and specify a module name I get an error:
>>
>>> php web\index.php/Test
>>> Could not open input file: web\index.php/Test
>>
>>> Is there a way to trigger a specific module or action from the  
>>> command
>>> line?
>>
>>> Thanks
>>
>> --
>> Gareth McCumskeyhttp://garethmccumskey.blogspot.com
>> twitter: @garethmcc
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to