Skip to content

Dispatcher requires controller method exist #23

@tysonphillips

Description

@tysonphillips

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions