PHP 8.3.4 Released!

Yaf_Route_Simple クラス

(Yaf >=1.0.0)

はじめに

Yaf_Route_Simple は、クエリ文字列を見てルート情報を取得します。

Yaf_Route_Simple に対して必要な設定は、 $_GET のどのキーがモジュールでどのキーがコントローラ、 そしてどのキーがアクションなのかを指定することです。

Yaf_Route_Simple::route() は常に true を返します。 そこで、Yaf_Route_Simple はルートスタックの先頭に置く必要があります。 そうしないと、他のルートは決して呼ばれなくなります。

クラス概要

class Yaf_Route_Simple implements Yaf_Route_Interface {
/* プロパティ */
protected $controller;
protected $module;
protected $action;
/* メソッド */
public __construct(string $module_name, string $controller_name, string $action_name)
public assemble(array $info, array $query = ?): string
public route(Yaf_Request_Abstract $request): bool
}

プロパティ

controller

module

action

目次

add a note

User Contributed Notes

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