TwistPHP Documentation

_replaceURI

File path: dist/twist/Core/Controllers/Base.controller.php
Namespace: Twist\Core\Controllers
Extends:

_replaceURIRegister an replace URI for a response function for instance if you had thankYou() as the function name you could register 'thank-you' as an replace URI.
All replaces must be registered from within a __construct function in your controller. Adding a replace means that the original thankYou() will no-longer be callable by routes.

Parameters

Name Type Description
$strURIstringn/a
$strFunctionNamestringn/a

Return Values

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

Example

<?php
//Set the variables for the example
$strURI 'foo';
$strFunctionName 'foo';

//Call the function _replaceURI with the example vars
$resBase = new \Twist\Core\Controllers\Base();
$resBase -> _replaceURI($strURI$strFunctionName);