Reputation: 51
i have a question, i am developing a library for Codeigniter to create Job Queues with workers and delayed queue (Codeigniter-JobQueue). But i have a question... ... How can i perform or execute controller's methods inside this library? It will be awesome to know this.
The library is taking "controller, method, params" to transform after to "http://www.example.com/controller/method/params".
Thanks, and if you want to help me to develop, you are welcome. ;)
Upvotes: 3
Views: 253
Reputation: 3794
Curl is a way to go. Controllers should output content and not return a variable. If you are scheduling any job, the library should call the URL itself. You could use the cli mode of codeigniter.
http://ellislab.com/codeigniter/user-guide/general/cli.html
Upvotes: 1
Reputation: 1416
Use curl. If you however expect a return variable from controllers method, then C in your MVC is not designed properly.
Upvotes: 1