So I've been exploring the CakePHP framework for the last week or so,
having decided that it was a good starting point for my latest project.


I'm familiar with MVC and the "Rails Way" so alot of the internals were
straightforward, and so far most of the functionality provided will be
more than adequate, however I've run into some serious shortcomings
with CakePHP's built-in session handling abilities.

I had developed a Session class for a previous project that implements
the functionality that I will need for this project, and today's
project has been figuring out how I can slot my customized Session
class into place without a) breaking things and b) patching any of
CakePHP's core files.

I've met with some success but I was hoping to get some CakePHP "vets"
to chime in on the steps I've taken, to make sure I'm not missing some
obscure spots where the old Session could still have its hooks in.  My
existing class pretty much implemented all the functionality that the
CakeSession class provided, so I can easily provide everything that
CakePHP expects from a session handler, I just want to make sure
nothing is silently broken by what I've done:

1) I set up my Session class and its support classes in the vendor/
folder to keep a clean separation.

2) I patched my Session class to use Cake's ConnectionManager class to
do all my database calls.

3) I load my classes in AppController via the vendor() command.

4) I created an app/controllers/components/session.php file to replace
the core component, and it implements all the existing functions of the
standard one (plus more that I need) using my class instead of
CakeSession.

4) I created an app/views/helpers/session.php file to replace the core
helper, and (again) it implements all the existing functions plus the
new ones I need, using my class instead of CakeSession.

(A quick note for anyone creating a helper or a component to interface
with a custom class they are using, I used PHP5's __call() magic method
to "pass-thru" calls to my Session class from either the helper or the
component without having to implement individual proxy methods in both
the component and the helper. very handy!)

That's what I've done so far.  I haven't had to change or replace
anything in the core folder and I've been able to do everything in the
app folder (which is great - I was very happy to see that this was
possible).  I did some grep'ing of the sources and I think I've got
everything.

Can anyone out there see places in CakePHP where sessions are used that
I've missed?  This is the start of a large project for me so I need to
get my foundation solid.

Thanks in advance!


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