Search code examples
cronfuelphp

FuelPHP: Calling Function of Controller inside Tasks


I found this document http://fuelphp.com/docs/general/tasks.html

I created "example" class Now, I can execute "example" But I want to change the code of run() function as it can call another funtion in my controller:

fuel\app\classes\controller\user\system.php

function name : test()

How can I do? Thanks for all your help.


Solution

  • Maybe my understanding was wrong. I changed to call function from "model" not from "controller". All I need is just adding "\" before the calling like We call that function in controller. For example:

    \Model_System:test()