1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111:
<?php
/**
* MvcCore
*
* This source file is subject to the BSD 3 License
* For the full copyright and license information, please view
* the LICENSE.md file that are distributed with this source code.
*
* @copyright Copyright (c) 2016 Tom Flidr (https://github.com/mvccore)
* @license https://mvccore.github.io/docs/mvccore/5.0.0/LICENCE.md
*/
namespace MvcCore\Router;
interface IConstants {
/**
* Default system route name, automatically created for requests:
* - For requests with explicitly defined ctrl and action in query string.
* - For requests targeting homepage with ctrl and action `Index:Index`.
* - For requests targeting any not matched path by other routes with
* configured router as `$router->SetRouteToDefaultIfNotMatch();` which
* target default route with controller and action `Index:Index`.
*/
const DEFAULT_ROUTE_NAME = 'default';
/**
* Default system route name, automatically created for error requests,
* where was uncaught exception in ctrl or template, caught by application.
* This route is created with controller and action `Index:Error` by default.
*/
const DEFAULT_ROUTE_NAME_ERROR = 'error';
/**
* Default system route name, automatically created for not matched requests,
* where was not possible to found requested ctrl or template or anything else.
* This route is created with controller and action `Index:NotFound` by default.
*/
const DEFAULT_ROUTE_NAME_NOT_FOUND = 'not_found';
/**
* Always keep trailing slash in requested URL or
* always add trailing slash into URL and redirect to it.
*/
const TRAILING_SLASH_ALWAYS = 1;
/**
* Be absolutely benevolent for trailing slash in requested url.
*/
const TRAILING_SLASH_BENEVOLENT = 0;
/**
* Always remove trailing slash from requested URL if there is any and
* redirect to it, except homepage.
*/
const TRAILING_SLASH_REMOVE = -1;
/**
* URL param name to define target controller.
*/
const URL_PARAM_CONTROLLER = 'controller';
/**
* URL param name to define target controller action.
*/
const URL_PARAM_ACTION = 'action';
/**
* URL param name to build absolute URL address.
*/
const URL_PARAM_ABSOLUTE = 'absolute';
/**
* URL param name to place custom host into route
* reverse pattern placeholder `%host%`.
*/
const URL_PARAM_HOST = 'host';
/**
* URL param name to place custom domain into route
* reverse pattern placeholder `%domain%`.
*/
const URL_PARAM_DOMAIN = 'domain';
/**
* URL param name to place custom top level domain
* into route reverse pattern placeholder `%tld%`.
*/
const URL_PARAM_TLD = 'tld';
/**
* URL param name to place custom second level domain
* into route reverse pattern placeholder `%sld%`.
*/
const URL_PARAM_SLD = 'sld';
/**
* URL param name to place custom basePath into route
* reverse pattern placeholder `%basePath%`.
*/
const URL_PARAM_BASEPATH = 'basePath';
/**
* URL param name to place custom basePath into route
* reverse pattern placeholder `%basePath%`.
*/
const URL_PARAM_PATH = 'path';
}