Tiger_Controller_Plugin_RouteOverride

@api · extends Zend_Controller_Plugin_Abstract

Tiger_Controller_Plugin_RouteOverride — apply declared pretty-route overrides.

At routeShutdown (after routing, before dispatch) this rewrites a request to a canonical MVC target when a declared override's prefix matches — but ONLY for URLs that no real controller already handles. That single guard (the PageDispatch trick, isDispatchable) is what lets a module mount a pretty /docs alias WITHOUT shadowing its own real paths:

/docs -> dispatchable (Docs_IndexController) -> left alone /docs/admin/settings -> dispatchable (Docs_AdminController) -> left alone /docs/getting-started-> NOT dispatchable -> rewritten to docs/index/docs + slug=getting-started

Overrides are walked in explicit priority order (Tiger_Routing_Overrides::all(), DESC), and the FIRST matching prefix wins — so ordering is decided here, in one place, never by Zend's last-in-first-out route stack. The remainder of the path (possibly nested) becomes the slug param. Registered ahead of PageDispatch so a pretty route claims its slug before the CMS content fallback considers it. Graceful: no overrides / no match -> the request is untouched.

Methods

routeShutdown()

routeShutdown(Zend_Controller_Request_Abstract $request)

Rewrite an unmatched URL to a declared override's canonical MVC target, with the remaining path handed on as the slug param.

  • $request Zend_Controller_Request_Abstract — the current request