PHP 8.6.0 Beta 3 is available for testing

Yaf_Request_Simple::__construct

(Yaf >=1.0.0)

Yaf_Request_Simple::__constructConstructor of Yaf_Request_Simple

Descrizione

public function Yaf_Request_Simple::__construct(
    string $method = ?,
    string $module = ?,
    string $controller = ?,
    string $action = ?,
    array $params = ?
)

Avviso

Questa funzione, al momento non è documentata; è disponibile soltanto la lista degli argomenti.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Esempi

Example #1 Yaf_Request_Simple::__construct() example

<?php
/**
 * In a CLI script, build a request that skips the routing
 * process by giving the MVC names directly.
 */
$request = new Yaf_Request_Simple(
    "CLI",            // method
    "Index",          // module
    "Product",        // controller
    "detail",         // action
    array("id" => 10) // request parameters
);

var_dump($request->isRouted()); /* requests with MVC names are pre-routed */
var_dump($request->getModuleName());
var_dump($request->getControllerName());
var_dump($request->getActionName());
var_dump($request->getParam("id"));
?>

Il precedente esempio visualizzerà qualcosa simile a:

bool(true)
string(5) "Index"
string(7) "Product"
string(6) "detail"
int(10)

Vedere anche:

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top