Yaf_Action_Abstract::execute

(PECL yaf >=1.0.0)

Yaf_Action_Abstract::executeExecute the action

Beskrivelse

abstract publicmixed Yaf_Action_Abstract::execute ([ mixed $arg [, mixed $... ]] )

Yaf_Action_Abstract::execute() may have agruments.

Note:

The value retrived from the request is not safe. you should do some filtering work before you use it.

Advarsel

This function is currently not documented; only its argument list is available.

Parametre

This function has no parameters.

Returnerings Værdier

Eksempler

Eksempel #1 Yaf_Action_Abstract::execute()example

<?php
/** 
 * A controller example
 */
class ProductController extends Yaf_Controller_Abstract {
      protected 
$actions = array(
          
"index" => "actions/Index.php",
      );
}
?>

Eksempel #2 Yaf_Action_Abstract::execute()example

<?php
/** 
 * ListAction
 */
class ListAction extends Yaf_Action_Abstract {
     public function 
execute ($name$id) {
         
assert($name == $this->getRequest()->getParam("name"));
         
assert($id   == $this->getRequest()->getParam("id"));
     }
}
?>

The above example will output something similar to:

/**
 * Now assuming we are using the Yaf_Route_Static route 
 * for request: http://yourdomain/product/list/name/yaf/id/22
 * will result:
 */
 bool(true)
 bool(true)

Se også

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top