Accessing controller methods inside a model with Kohana/MVC Framework

Posted by eth0 on Stack Overflow See other posts from Stack Overflow or by eth0
Published on 2010-06-08T22:01:34Z Indexed on 2010/06/08 22:12 UTC
Read the original article Hit count: 276

Filed under:
|
|
|

Hi all, I need to able to access controller methods from a model using the Kohana V2.3 framework. At the moment I'm passing the controller object (by ref.) to the model on creation which works perfectly fine but I can't help think there is a more "cleaner" way - does anybody have any suggestions? Would Kohana V3 resolve this with its HMVC pattern?

This may help: http://www.ifc0nfig.com/accessing-the-calling-controller-in-a-model-within-kohana/

© Stack Overflow or respective owner

Related posts about php

Related posts about mvc