Yaf_Action_Abstract::execute

(Yaf >=1.0.0)

Yaf_Action_Abstract::executeAction entry point

Beschreibung

abstractpublicYaf_Action_Abstract::execute(mixed...$args): mixed

user should always define this method for a action, this is the entry point of an action. Yaf_Action_Abstract::execute() may have agruments.

Hinweis:

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

Parameter-Liste

args

Rückgabewerte

Beispiele

Beispiel #1 Yaf_Action_Abstract::execute()example

<?php

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

Beispiel #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"));
}
}
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

 bool(true) bool(true)

Siehe auch

To Top