Welcome Guest, Not a member yet? Register   Sign In
Call controller method within library without redirect
#2

(This post was last modified: 06-01-2017, 04:10 PM by PaulD.)

I have not looked at your full code (sorry) but I believe you cannot do what you ask (ie call controller method from somewhere else) without HMVC or similar. (I am not 100% on this though)

However there is no reason why your callback in, say, controller A, cannot call a common function (say 'common_callback_function') from a model or a library to get a result, just like any library or model call works. It is just a function after all. Then you are free to reuse that common_callback_function in any other library, or from where ever you want. Keeping everything DRY.

I hope that makes sense.

Paul.
Reply


Messages In This Thread
RE: Call controller method within library without redirect - by PaulD - 06-01-2017, 04:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB