Log each method call in Kohana?

You can use before() and after() methods to log your controller name & action (use $this->request to get these values) There is no such methods for models, but I don't like using call() for this purpose. May be you should log your models in controllers? Like this: somewhere in controller $cid = $this->request->param('cat_id'); // call custom model method $articles = ORM::factory('article')->get_by_category($cid); // log model call // etc.

You can use before() and after() methods to log your controller name & action (use $this->request to get these values). There is no such methods for models, but I don't like using __call() for this purpose. May be you should log your models in controllers?

Like this: // somewhere in controller $cid = $this->request->param('cat_id'); // call custom model method $articles = ORM::factory('article')->get_by_category($cid); // log model call // etc.

You can extend Kohana_Controller and Kohana_Model with the following: public function __call($name, $arguments) { // Log call here // Now return the real method return parent::__call($name, $arguments) } __call() is fairly slow, so you'll want to remove these eventually.

– Kemo Mar 9 at 19:21 You are right, I had a brain fart! :( Use biakaveron's suggestion. – zombor Mar 9 at 22:35.

Find a resource file in a given directory using Kohana's cascading filesystem. Returns an array if the type is i18n or a configuration file. When file is found it returns a string with the path to the file.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions


Thank You!
send