TwistPHP Documentation

restrict

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

restrictRestrict a page to logged in users only, place a '%' at the end of the URI will apply this restriction to all child pages as well as itself

Parameters

Name Type Description
$strURIstringn/a
$strLoginURIstringn/a
[$intLevel = 1]integern/a

Return Values

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

Example

<?php
//Set the variables for the example
$strURI 'foo';
$strLoginURI 'foo';
$intLevel 1;

//Call the function restrict with the example vars
Twist::Route() -> restrict($strURI$strLoginURI$intLevel);