Friday, July 31, 2009

Re: Calling component in helpers / Calling models in helpers

Say you are using the Cookie component, and place this in your
beforeFilter().

function beforeFilter() {
$this->Cookie->name = 'COOKIE';
}

If you import the component like so, the above setting WILL NOT be
applied to the imported cookie component, so you will get mixed
results.

App::import('Component', 'CookieComponent');
$Cookie = new CookieComponent();
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: