Re: Array of Objects in session, is it possible to access member functions?
From: rush (pipa_at_rush.avalon.hr)
Date: 07/29/04
- Next message: Nikolai Chuvakhin: "Re: Scrip for sending an eMail via PHP and Outlook"
- Previous message: Nikolai Chuvakhin: "Re: pasing part of an URL to commandline php"
- In reply to: college: "Array of Objects in session, is it possible to access member functions?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 29 Jul 2004 17:43:47 +0200
"college" <collegeguys4@yahoo.com> wrote in message
news:8da449c8.0407281305.50bf212d@posting.google.com...
> I am trying to pass an array of user objects in session and take the
> array out of session and call the member functions of each object.
> However I am getting a Fatal error: Call to a member function on a
> non-object. I have session.autostart turned off, and I have the
> class definition for those objects included before the call to
> session_start(). I am on PHP 4.2.3. Is this possible to do? While
> debugging, it appears that the objects in the array are only seen as a
> type of standard "object", and that I can only access the member
> variables of the object. I tried casting to the user defined class,
> but this does not see to work. Is there a way to pull these objects
> out of an array that was in the session, and call the member functions
> of these objects?
yes but, the class of the object in the question should also be defined in
the code that is executing the function call.
-- http://www.templatetamer.com/
- Next message: Nikolai Chuvakhin: "Re: Scrip for sending an eMail via PHP and Outlook"
- Previous message: Nikolai Chuvakhin: "Re: pasing part of an URL to commandline php"
- In reply to: college: "Array of Objects in session, is it possible to access member functions?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|