Ok well the way I've decided to do this is through a static class
variable.  That means it only works in PHP5, but that's my environment
so it will be good enough for me.

In AppController I added:

> static $CurrentController

and then the constructor has

> self::$CurrentController = $this

as the last line in it.

Now from any object in my app I can access the current page controller
by calling AppController::$CurrentController.

Works for me..



On Nov 2, 2:07 pm, "sbarre" <[EMAIL PROTECTED]> wrote:
> Yeah we talked about this already and this is not a solution for me, as
> I said in my first message, my Session class needs access to some
> controller parameters during initialization.
>
> Waiting for the controller's beforeFilter() call is too late for me.
>
> Thanks for the tip though..  I'll keep thinking..
>
> On Nov 1, 5:47 pm, gwoo <[EMAIL PROTECTED]> wrote:
> 
> > use startup(&$controller) method inside your component.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to