(Yaf >=1.0.0)
Yaf_Action_Abstract::execute — 执锟叫讹拷锟斤拷
Yaf_Action_Abstract::execute() 锟斤拷锟杰伙拷锟叫诧拷锟斤拷
Note:
锟斤拷锟斤拷锟襟返回碉拷值锟斤拷锟斤拷锟角诧拷锟斤拷全锟侥o拷锟斤拷使锟斤拷之前锟斤拷锟斤拷要锟斤拷锟斤拷锟角癸拷锟斤拷一锟介。
锟斤拷锟斤拷锟斤拷锟斤拷未锟斤拷写锟侥碉拷锟斤拷锟斤拷锟叫诧拷锟斤拷锟叫憋拷
锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷
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)