-
Notifications
You must be signed in to change notification settings - Fork 788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TO CLARIFY] Allow usage of controller A inside controller B #706
Comments
Interesting! By the way other "real" frameworks do this via static or pseudo(?)-static calls, like In HUGE, when wanting to call some functions several times I'm usually creating static methods inside a new class in /core folder, like the Filter class for example, and then call the method everywhere inside the project via The reasons is that calling a controller from another controller feels a little bit weird and inaccurate, i remember some issues when reading into proper MVC, even I dot this by myself every day :) in Yii framework. I find your idea quite clever, so is it okay if I put it inside the project ? Feel free to submit a pull request if you like! Thanks a lot! |
Hi @panique I would be honored if this was part of the project! I just added a static method as well if you feel that would be better :) Also, I am new to GitHub (Joined the 17th of this month, ha ha) and am not sure what a pull request entails but I would love to take a stab at it! I am a quick learner so if you have want to point me in the right direction, that would be great. |
He, I've linked this ticket from the main README, but I'll close this ticket for now (hope that's okay for you). Let's reopen this when there's a bulletproof solution or pull request. |
Hy panique, i m desperate , because the ' header location and redirects do not work ? Help me if you can . Congratulations on the job |
loginwithcookie doesn't work and go in loop |
Only working with HUGE for a couple weeks, during some implementation I ran across the need to copy some functions from one controller to be able to use in another. I decided to create a function that would make this easier.
OBJECT->METHOD UPDATED 8/22/2015
This one function is added to the main
Controller
classAnd to use within a Controller (ie. UserController)
STATIC::METHOD Updated 8/22/2015
This may be easier on the eyes when using...pure preference though.
This one function is added to the main
Controller
classAnd to use within a Controller (ie. UserController)
Not sure if this is something that others feel should be a part of the framework but like I said, it has helped me out tremendously, especially when I split 'processing' functions from 'view' functions into separate controllers for easier maintenance. Surely that is not the only use case though.
Thoughts anyone? :)
The text was updated successfully, but these errors were encountered: