Action and pass variable to all actions in symfony 1.4
问题 I want to make some action (php script) before all actions in my frontend app and then pass a result from that script to actions in variable - so I can get variable value from all actions. Where should I declare sth like this? 回答1: If the filter solution dont feet your needs, you can also create a base action class with a preExecute function: // app/frontend/lib/baseActions.class.php class baseActions extends sfActions { public function preExecute() { $this->myVar = .... // define your vars..