Strata\Router\Router

Assigns callback handlers based on the possible different contexts.

    Synopsis

    class Router {
    • // members
    • public Route $route = null;
    }

    Members

    Methods

    private

    • log() — Sends a message to the global logger.

    public

    • abandonCurrent() — Abandons the current route.
    • callback() — Generates a dynamic and unique callback ready to use with Wordpress' add_action or add_filter calls.
    • getCurrentAction() — Returns the current action.
    • getCurrentController() — Returns the current controller object.
    • isAjax() — Returns whether the current request is considered being called as an Ajax query.
    • isFrontendAjax() — Attempts to decide if the current Ajax request is happening on the frontend instead of the backend.
    • run() — Attempts to run the currently loaded route object.
    • urlRouting() — Generates a parser for URL based rules, as one may be used to in the world of Model View Controller programming.