Yaf_Action_Abstract
PHP Manual

Yaf_Action_Abstract::execute

(PECL yaf >=1.0.0)

Yaf_Action_Abstract::executeExecute the action

説明

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

Yaf_Action_Abstract::execute() may have agruments.

注意:

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

警告

この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。

パラメータ

この関数にはパラメータはありません。

返り値

例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)

参考


Yaf_Action_Abstract
PHP Manual