(Yaf >=1.0.0)
はじめに
Yaf_Route_Simple は、クエリ文字列を見てルート情報を取得します。
Yaf_Route_Simple に対して必要な設定は、 $_GET のどのキーがモジュールでどのキーがコントローラ、 そしてどのキーがアクションなのかを指定することです。
Yaf_Route_Simple::route() は常に true
を返します。
そこで、Yaf_Route_Simple はルートスタックの先頭に置く必要があります。
そうしないと、他のルートは決して呼ばれなくなります。
クラス概要
Yaf_Route_Simple implements Yaf_Route_Interface {
protected
$controller
protected
$module
protected
$action
/* メソッド */
public assemble
( array $info
[, array $query
] ) : string
public __construct
( string $module_name
, string $controller_name
, string $action_name
)
public route
( Yaf_Request_Abstract $request
) : bool
}
プロパティ
controller
module
action
目次
- Yaf_Route_Simple::assemble — URLを組み立てる
- Yaf_Route_Simple::__construct — Yaf_Route_Simple のコンストラクタ
- Yaf_Route_Simple::route — リクエストをルーティングする
/* プロパティ */