Re: Component code

2010-09-03 Thread alaxos
Hello, You can call a model function from a component. Here's a way to do it: - class MyComponent { private $controller; public function initialize(&$controller) { $this->controller = $controller; } public fu

Re: Component code

2010-09-02 Thread Richard Claydon
Why not pass the Session object to the model? $this->doSomething($with_this_data, $store_it_here); On Fri, Sep 3, 2010 at 6:05 AM, Jeremy Burns | Class Outfit < jeremybu...@classoutfit.com> wrote: > I should mention that I both read from and write to the session... > > Jeremy Burns > Class Out

Re: Component code

2010-09-02 Thread Jeremy Burns | Class Outfit
I should mention that I both read from and write to the session... Jeremy Burns Class Outfit jeremybu...@classoutfit.com (t) +44 (0) 208 123 3822 (m) +44 (0) 7973 481949 Skype: jeremy_burns http://www.classoutfit.com On 3 Sep 2010, at 06:00, Dave Maharaj wrote: > Place the code in the model and

RE: Component code

2010-09-02 Thread Dave Maharaj
Place the code in the model and pass the Session data as vars from the controller? -Original Message- From: Jeremy Burns [mailto:jeremybu...@classoutfit.com] Sent: September-03-10 2:24 AM To: CakePHP Subject: Component code I have a chunk of code that appears in two controllers (orders_