Exposing values from Actions to View

After the Action’s execute() or specified method was executed, the values available from the Action’s getter methods will be extracted and made available to Views.

For example, take this Action implementation:

<?php
 
require_once "lib/mivec/action/WebAction.php";
 
class MyAction extends WebAction
{
    //.... other code omitted
 
    function getInterestRate()
    {
        return 0.56421;
    }
 
    function getCheckBalance()
    {
        return $this->checkBalance;
    }
}
 
?>

Variables “interestRate” and “checkBalance” will be available to the View instance.

For PHP 4, the variables will be "interestrate" and "checkbalance".
For PHP 5, the variables will be "interestRate" and "checkBalance". Mivec Framework will detect the
version of PHP and make the name of the variable accordingly.

« Prev: Request Parameters Mapping

 
  basics/expose_result_values.txt · Last modified: 2005/02/15 03:00
 
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki

SourceForge.net Logo