2009/1/29 Thomas Rabaix <[email protected]> > The problem is you cannot have to class with the same name : > 'exportAction'. You can solve this issue by moving the action into the main > actions.class.php. > > Or if you are using sf1.2 I think you can prefix the class name with the > module name : Module1_exportAction.
Thanks for the workaround, works fine. I'am using 1.2 But now my point is why the require_once isn't done in the getController method ? > > > On Thu, Jan 29, 2009 at 4:11 PM, Olivier Mansour <[email protected]>wrote: > >> Hey >> >> I have this particular case. >> >> In an action code I am testing several times the existence of actions >> using this code : >> >> if (!sfContext::getInstance()->getController()->actionExists($module_name, >> $action_name)) >> >> >> It works fine so far. >> >> But today someone code an action with the same name of a previous one but >> in a different module. ie module1/export and module2/export >> Clearly, we have too files like this : >> module1/actions/exportAction.class.php and >> module2/actions/exportAction.class.php >> >> When I run actionExist on these two actions, the 2nd time this error is >> raised : >> cannot redeclare exportAction already declared in .... >> module2/actions/exportAction.class.php >> >> It appear that controllerExists called by actionExists is doeing a >> require_once on the controler class. My point it's maybe that it will be >> more efficient if the getController method were in charge of the >> require_once ? >> >> What is your advice about that ? >> Thanks >> >> -- >> Olivier Mansour >> [email protected] >> http://www.glagla.org >> >> >> > > > -- > Thomas Rabaix > > > > > -- Olivier Mansour [email protected] http://www.glagla.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony developers" 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-devs?hl=en -~----------~----~----~----~------~----~------~--~---
