I'm just now realizing that a component, at the constructor "moment",
does not have access to the controller it is being embedded into..  I'm
wondering if this is a security thing, or what the reasoning behind
this is?

In my case, as I've written on this list before, I've replaced the
built-in Cake session handling with my own custom session class, and as
a consequence I've had to replace the Session component and the Session
helper classes with ones that instance my Session class instead.

The problem I am encountering is that my Session class uses controller
parameters to initialize itself.

As one quick example, I use a hierarchical session storage structure
that allows you to set variables at different levels:

session
> controller
>> action
>>> section
>>>> page

This means that you can have generic and simple to remember variables
like "records_per_page" that co-exist at various levels in the hiearchy
making for very efficient view re-use..

There are other places in the constructor that I need to access
information about the current URL/parameters/etc , and I'd like to keep
it clean and do it through the controller.

I am hoping to derive the controller and action names automatically
(without parsing the _SERVER variables manually), but this information
doesn't seem to be available to me in the constructor of my Session
variable.

Does anyone know how I can do this without getting into the libs/
folder?  Can I safely replace the lib/controller/component.php class
with my own in the app/ tree?


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