Tuesday, February 1, 2011

Re: where would you put the container?

On Tue, Feb 1, 2011 at 1:14 PM, cake-learner <sh.koizumi@gmail.com> wrote:
> I want to set up a container so that i can save everything and access
> through that class when getting session variables.
>
> Page A
> $appClass = new AppClass();
> $appClass -> specific_value = 1000;
> $this -> Session -> write( "appclass", appClass );
>
> Page B
> $appClass = $this -> Session -> read( "appclass", appClass );
> echo $appClass -> specific_value;
> echo $appClass -> other_value;
>
> In other frameworks, they have a certain folder for autoload ( all
> classes within that folder will be loaded automatically ) but i am not
> sure if cakephp has one.
> Or I could set up a single class and include it in that top of page

Can you give a more concrete example? It's not really clear to me what
problem you're trying to solve.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: