TwistPHP Documentation

view

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

viewAdd a view that will be called upon a any request (HTTP METHOD) to the given URI, using this call will not take precedence over a GET,POST,PUT or DELETE route.
The URI can be made dynamic by adding a '%' symbol at the end.

Parameters

Name Type Description
$strURIstringn/a
$dirViewstringn/a
[$mxdBaseView = true]mixedn/a
[$mxdCache = false]mixedn/a
[$arrData = array()]arrayn/a

Return Values

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

Example

<?php
//Set the variables for the example
$strURI 'foo';
$dirView '/home/user/public_html/twist';
$mxdBaseView true;
$mxdCache false;
$arrData = array();

//Call the function view with the example vars
Twist::Route() -> view($strURI$dirView$mxdBaseView$mxdCache$arrData);