« Yaf_Router::route
Yaf_Route_Simple::assemble »

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 function __construct(string $module_name, string $controller_name, string $action_name)
public function assemble(array $info, array $query = ?): string
public function route(Yaf_Request_Abstract $request): bool
}

プロパティ

controller

module

action

目次

関連キーワード:
Route   route   assemble   ルート   キー   protected   controller   module   action   プロパティ   construct   Router   クエリ   コントローラ   アクション   スタック   概要   implements   Interface   info   query   Request   Abstract   request   目次
関連する関数・ページ:
class.yaf-route-map   yaf-route-simple.construct   yaf-route-map.route   yaf-route-simple.route   yaf-route-map.construct   yaf-route-static.route