Yaf_Action_Abstract::execute

(Yaf >=1.0.0)

Yaf_Action_Abstract::execute執(zhí)行動作

說明

abstract publicYaf_Action_Abstract::execute(mixed $arg = ?, mixed $... = ?): mixed

Yaf_Action_Abstract::execute() 可能會有參數(shù)

注意:

從請求返回的值可能是不安全的,在使用之前你需要對它們過濾一遍。

警告

本函數(shù)還未編寫文檔,僅有參數(shù)列表。

參數(shù)

此函數(shù)沒有參數(shù)。

返回值

范例

示例 #1 Yaf_Action_Abstract::execute()example

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

示例 #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"));
     }
}
?>

以上例程的輸出類似于:

/**
 * 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)

參見