PHP 8.4.1 Released!

Yaf_Route_Simple::__construct

(Yaf >=1.0.0)

Yaf_Route_Simple::__constructYaf_Route_Simple constructor

Açıklama

public Yaf_Route_Simple::__construct(string $module_name, string $controller_name, string $action_name)

Yaf_Route_Simple will get route info from query string. and the parameters of this constructor will used as keys while searching for the route info in $_GET.

Uyarı

Bu işlev hala belgelendirilmemiştir; sadece bağımsız değişken listesi mevcuttur.

Bağımsız Değişkenler

module_name

The key name of the module info.

controller_name

the key name of the controller info.

action_name

the key name of the action info.

Dönen Değerler

Always return true.

Örnekler

Örnek 1 Yaf_Route_Simple::route()example

<?php
$route
= new Yaf_Route_Simple("m", "controller", "act");
Yaf_Router::getInstance()->addRoute("simple", $route);
?>

Örnek 2 Yaf_Route_Simple::route()example

Request: http://yourdomain.com/path/?controller=a&act=b
=> module = default(index), controller = a, action = b

Request: http://yourdomain.com/path
=> module = default(index), controller = default(index), action = default(index)

Ayrıca Bakınız

add a note

User Contributed Notes

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