I wrote a wrapper method in CakePHP 1.3 that has a return value.
I would like to access this method from inside the controller so that I can pass its return value to the view.
I am not sure how to access these methods from inside the controller. Did I do it wrong?
I could easily duplicate the code, but I would like to “keep it DRY”, and the actual functionality, I believe, does not belong to this particular controller - I just need to return the value in this particular view.
EDIT:
I understand that I am asking the wrong question here, since the shell itself does not have to return a value. I changed the code so that Shell uses only the return value, and now I'm wondering - what place for additional classes / code should I get from the shell and the Controller?
It looks like component code, but I'm not sure how to access components from the shell. This is not a plugin, as I understand them. Where is it going?
source
share