(Yaf >=1.0.0)
Examples:
define action in a separate file

You can also define a action method in a separate PHP script by using this property and Yaf_Action_Abstract.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
class IndexController extends Yaf_Controller_Abstract {
    protected $actions array(
        /** now dummyAction is defined in a separate file */
        "dummy" => "actions/Dummy_action.php",
    );
 
    /* action method may have arguments */
    public indexAction($name$id) {
       /* $name and $id are unsafe raw data */
       assert($name == $this->getRequest()->getParam("name"));
       assert($id   == $this->_request->getParam("id"));
    }
}
?>
Dummy_action.php
1
2
3
4
5
6
7
<?php
class DummyAction extends Yaf_Action_Abstract {
    /* a action class shall define this method  as the entry point */
    public execute() {
    }
}
?>
Yaf_Controller_Abstract::getInvokeArg
  • References/PHP/Function/Extensions/Yaf/Yaf_Controller_Abstract

(Yaf >=1.0.0) The getInvokeArg purpose public

2025-01-10 15:47:30
Yaf_Controller_Abstract::getView
  • References/PHP/Function/Extensions/Yaf/Yaf_Controller_Abstract

(Yaf >=1.0.0) Retrieve the view engine public

2025-01-10 15:47:30
Yaf_Controller_Abstract::getRequest
  • References/PHP/Function/Extensions/Yaf/Yaf_Controller_Abstract

(Yaf >=1.0.0) Retrieve current request object

2025-01-10 15:47:30
Yaf_Controller_Abstract::redirect
  • References/PHP/Function/Extensions/Yaf/Yaf_Controller_Abstract

(Yaf >=1.0.0) Redirect to a URL public bool

2025-01-10 15:47:30
Yaf_Controller_Abstract::__clone
  • References/PHP/Function/Extensions/Yaf/Yaf_Controller_Abstract

(Yaf >=1.0.0) Yaf_Controller_Abstract can not be cloned

2025-01-10 15:47:30
Yaf_Controller_Abstract::setViewpath
  • References/PHP/Function/Extensions/Yaf/Yaf_Controller_Abstract

(Yaf >=1.0.0) The setViewpath purpose public

2025-01-10 15:47:30
Yaf_Controller_Abstract::render
  • References/PHP/Function/Extensions/Yaf/Yaf_Controller_Abstract

(Yaf >=1.0.0) Render view template protected

2025-01-10 15:47:30
Yaf_Controller_Abstract::__construct
  • References/PHP/Function/Extensions/Yaf/Yaf_Controller_Abstract

(Yaf >=1.0.0) Yaf_Controller_Abstract constructor

2025-01-10 15:47:30
Yaf_Controller_Abstract::getModuleName
  • References/PHP/Function/Extensions/Yaf/Yaf_Controller_Abstract

(Yaf >=1.0.0) Get module name public string

2025-01-10 15:47:30
Yaf_Controller_Abstract::display
  • References/PHP/Function/Extensions/Yaf/Yaf_Controller_Abstract

(Yaf >=1.0.0) The display purpose protected

2025-01-10 15:47:30