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
[$blBaseView = true]booleann/a
[$blCache = false]booleann/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';
$blBaseView true;
$blCache false;
$arrData = array();
$strRequestMethod null;

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