Most probably because the sfComponent's constructor needs 3 parameters.

On Tue, Mar 24, 2009 at 17:25, dziobacz <[email protected]> wrote:
>
> Heh - ok so:
>
> private $ident;
>
>  public function __construct()
>  {
>         parent::__construct();
>        $this->ident=2;
>  }
>
> but I have still errors:
> Missing argument 1 for sfComponent::__construct()
> Missing argument 2 for sfComponent::__construct()
> Missing argument 3 for sfComponent::__construct()
> Undefined variable: context
> Undefined variable: moduleName
> Undefined variable: actionName
> Call to a member function getEventDispatcher() on a non-object
>
> I don't have this errors without constructor.
>
>
> On 24 Mar, 17:16, Pierre <[email protected]> wrote:
>> $this->ident ... ever heard of $this? ;)
>>
>> On 24 Mrz., 17:06, dziobacz <[email protected]> wrote:
>>
>> > It doesn't work for me:
>>
>> > class see_userActions extends sfActions
>> > {
>> >   private $ident;
>>
>> >   public function __construct()
>> >   {
>> >         parent::__construct();
>> >         $ident=2;
>> >   }
>> > .........................
>>
>> > }
>>
>> > What can be the reason ?
>>
>> > On 24 Mar, 16:41, Fási Gábor <[email protected]> wrote:
>>
>> > > You can use __construct(), just like anywhere else in php. Remember to
>> > > call parent::__construct().
>>
>> > > On Tue, Mar 24, 2009 at 16:11, 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 ??
>>
>>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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