You are here: Autoloading class definitions of composed objects on unserialize() from session « PHP Programming Language « IT news, forums, messages
Autoloading class definitions of composed objects on unserialize() from session

Posted by carrion on 05/14/07 15:53

Hello everyone!
I'm currently working on a MVC-framework and have run into an issue.

I'm using separate script files to render the active page's CSS and
Javascript Code.
I want to pull the data from the page controller object, which is
initialized in another script.
I thought this wouldn't be a problem if I simply stored the controller
in the session-file, but the unserialization of the object simply
won't work.
The controller has properties that are of different class types than
the controller itsself (page-secific Model and View objects).

My Questions:

1. Are there any problems using $myObj=$_SESSION['myObj']; ?
I thought that as of PHP5 this should work?

2. do class definitions of contained objects also have to be known
when i unserialize?
(like my Model/View objects)

3. can I get __autoload to help me out of this?

4. if not, can i perform some sort of __sleep()/__wakeup() magic to
achieve the same effect?

Any help is very much appreciated, thx.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация