Skip to content
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

Dispatcher requires controller method exist #23

Open
tysonphillips opened this issue Feb 19, 2018 · 1 comment
Open

Dispatcher requires controller method exist #23

tysonphillips opened this issue Feb 19, 2018 · 1 comment

Comments

@tysonphillips
Copy link
Member

The Dispatcher makes a call to method_exists($ctrl, $action) to check whether the given action exists on the controller, otherwise it throws an exception. However, this does not allow for controllers to implement the magic methods __call or __callStatic to handle actions/autoloading dynamically.

Consider updating this to check whether the method_exists or is_callable.

Note: if a class implements __call then is_callable will always be true, which I think is the desired behavior, i.e., route the action to the specific controller to determine what it should do via __call.

@clphillips
Copy link
Contributor

Sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants