Yaf_Action_Abstract::execute

(Yaf >=1.0.0)

Yaf_Action_Abstract::executeִ�ж���

˵��

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

Yaf_Action_Abstract::execute() ���ܻ��в���

Note:

�����󷵻ص�ֵ�����Dz���ȫ�ģ���ʹ��֮ǰ����Ҫ�����ǹ���һ�顣

Warning

��������δ��д�ĵ������в����б�

����

�˺���û�в�����

����ֵ

����

Example #1 Yaf_Action_Abstract::execute()example

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

Example #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)

�μ�