nglasl\misdirection\MisdirectionService
Handles the link mapping recursion to return the eventual result, while providing any additional functionality required by the module.
@author Nathan Glasl <nathan@symbiote.com.au>
Synopsis
class MisdirectionService
{
- // methods
- public static void unify_URL()
- public static void is_external_URL()
- public void getMappingByRequest()
- public void getMapping()
- public void getRecursiveMapping()
- public void determineFallback()
- public void createPageMapping()
- public void createURLMapping()
Methods
public
- createPageMapping() — Instantiate a new link mapping, redirecting a URL towards a page.
- createURLMapping() — Instantiate a new link mapping, redirecting a URL towards another URL.
- determineFallback() — Determine the fallback for a URL when the CMS module is present.
- getMapping() — Retrieve the appropriate link mapping for a URL.
- getMappingByRequest() — Retrieve the appropriate link mapping for a request, with the ability to enable testing and return the recursion stack.
- getRecursiveMapping() — Traverse the link mapping chain and return the eventual result, preventing multiple redirections.
- is_external_URL() — Use third party validation to determine an external URL (https://gist.github.com/dperini/729294 and http://mathiasbynens.be/demo/url-regex).
- unify_URL() — Unifies a URL so link mappings are predictable.