Strata\Router\RouteParser\Callback\CallbackRouter

Maps Wordpress actions, filters and callbacks to Strata classes

    Synopsis

    class CallbackRouter extends Router {
    • // Inherited members from Router
    • public Route $route;
    • // methods
    • public static CallbackRoute factory()
    • public array generate()
    • public void run()
    }

    Hierarchy

    Members

    Methods

    public

    • factory() — Returns an instance of the router instantiated with the optional $routes.
    • generate() — Generates a new dynamic route that can be passed as a callable object.
    • run() — {@inheritdoc}

    Inherited from Strata\Router\Router

    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.