TwistPHP Documentation

addRoute

File path: dist/twist/Core/Utilities/Route.utility.php
Namespace: Twist\Core\Utilities
Extends: Base

addRouteAdd the route into the array of listeners, when the serve function if called the listeners array will be processed and a page will be served

Parameters

Name Type Description
$strURIstringn/a
$strTypestringn/a
$strItemstringn/a
[$mxdBaseView = true]mixedn/a
[$mxdCache = false]mixedn/a
[$arrData = array()]arrayn/a
[$strRequestMethod = null]stringn/a

Return Values

void — No return information has been documented for this function.

Example

<?php
//Set the variables for the example
$strURI 'foo';
$strType 'foo';
$strItem 'foo';
$mxdBaseView true;
$mxdCache false;
$arrData = array();
$strRequestMethod null;

//Call the function addRoute with the example vars
Twist::Route() -> addRoute($strURI$strType$strItem$mxdBaseView$mxdCache$arrData$strRequestMethod);