Notice: Undefined offset: 8192 in /home/miphpf/domains/miphpf.com/public_html/includes/common.inc on line 499

Notice: Undefined offset: 8192 in /home/miphpf/domains/miphpf.com/public_html/includes/common.inc on line 506
Controller Commands | MIPHPF - Your Open Source RAD PHP Framework
Skip navigation.
Home

Controller Commands

: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/miphpf/domains/miphpf.com/public_html/includes/unicode.inc on line 291.

Controller commands are objects of type miControllerCommand which represent instructions to the page object. Controller commands are processed after action processing has finished. There are two types of instructions:
* redirect to a location
* display HTML or text

Examples:

* Redirect the user to another page

<?php
//  the user will be redirected to www.google.com
$location = 'www.google.com';
$controllerCommand = new miControllerCommand(miControllerCommand::CONTROLLER_COMMAND_REDIRECT, $location);
$dataManager->addControllerCommand($controllerCommand);
?>

* Display HTML or text
<?php
$text
= 'Hello <strong>world</strong>!';
$controllerCommand = new miControllerCommand(miControllerCommand::CONTROLLER_COMMAND_HTML, $text);
$dataManager->addControllerCommand($controllerCommand);
?>