Yaf_Route_Map (class)

The Yaf_Route_Map class

Introduction

(Yaf >=1.0.0)

Yaf_Route_Map is a built-in route, it simply convert a URI endpoint (that part of the URI which comes after the base URI: see Yaf_Request_Abstract::setBaseUri()) to a controller name or action name(depends on the paramter passed to Yaf_Route_Map::__construct()) in following rule: A => controller A. A/B/C => controller A_B_C. A/B/C/D/E => controller A_B_C_D_E.

If the second parameter of Yaf_Route_Map::__construct() is specificed, then only the part before delimeter of URI will used to routing, the part after it is used to routing request parameters (see the example section of Yaf_Route_Map::__construct()).

Class synopsis

Yaf_Route_Map implements Yaf_Route_Interface {
/* Properties */
protected $_ctl_router ;
protected $_delimeter ;
/* Methods */
public string assemble ( array $info [, array $query ] )
public __construct ([ string $controller_prefer = false [, string $delimiter = "" ]] )
public bool route ( Yaf_Request_Abstract $request )
}

Properties

_ctl_router
_delimeter

Table of Contents

© 1997–2017 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://secure.php.net/manual/en/class.yaf-route-map.php

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部