Please read: For Symfony 1.0: http://www.symfony-project.org/book/1_0/06-Inside-the-Controller-Layer#chapter_06_actions
Or for Symfony 1.1: http://www.symfony-project.org/book/1_1/06-Inside-the-Controller-Layer#chapter_06_actions Or for Symfony 1.2: http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Layer#Actions It should answer all your questions about actions in Symfony. I'd recommend you to use preExecute, but if you still want to use __construct, try this (Symfony 1.2): class see_userActions extends sfActions { public function __construct($context, $moduleName, $actionName) { // do your stuffs here parent::__construct($context, $moduleName, $actionName); // or here } } On Wed, Mar 25, 2009 at 4:11 AM, dziobacz <[email protected]> wrote: > > How can I make constructor in symfony ? I have tried: > > class see_userActions extends sfActions > { > private $id; > > public function initialize() > { > $id=2; > } > ................. > } > > Error: > Strict Standards: Declaration of zobacz_uzytkownikaActions::initialize > () should be compatible with that of sfAction::initialize() > Call to a member function notify() on a non-object > > Why ?? > > > -- Blue Horn Ltd - System Development http://bluehorn.co.nz --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
