文字

Yaf_Action_Abstract::execute

(Yaf >=1.0.0)

Yaf_Action_Abstract::execute执行动作

说明

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

Yaf_Action_Abstract::execute() 可能会有参数

Note:

从请求返回的值可能是不安全的,在使用之前你需要对它们过滤一遍。

Warning

本函数还未编写文档,仅有参数列表。

参数

此函数没有参数。

返回值

范例

Example #1 Yaf_Action_Abstract::execute() example

<?php

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

Example #2 Yaf_Action_Abstract::execute() example

<?php

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

以上例程的输出类似于:

 bool(true)
 bool(true)

参见

上一篇: 下一篇: