本文整理汇总了PHP中lithium\net\http\Router::attached方法的典型用法代码示例。如果您正苦于以下问题:PHP Router::attached方法的具体用法?PHP Router::attached怎么用?PHP Router::attached使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lithium\net\http\Router
的用法示例。
在下文中一共展示了Router::attached方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _saveCtrlContext
protected function _saveCtrlContext()
{
$this->_context['scope'] = Router::scope(false);
$this->_context['routes'] = Router::get();
$this->_context['scopes'] = Router::attached();
Router::reset();
}
示例2: testListAttached
public function testListAttached()
{
Router::attach('scope1', array('prefix' => 'scope1', 'absolute' => true));
Router::attach('scope2', array('prefix' => 'scope2', 'library' => 'app'));
Router::attach('scope3', array('prefix' => 'scope3'));
$expected = array('scope1' => array('prefix' => 'scope1', 'absolute' => true, 'host' => null, 'scheme' => null, 'base' => null, 'pattern' => '@^(.*?)//localhost/scope1/@', 'library' => 'scope1', 'values' => array(), 'params' => array()), 'scope2' => array('prefix' => 'scope2', 'library' => 'app', 'absolute' => false, 'host' => null, 'scheme' => null, 'base' => null, 'pattern' => '@^/scope2/@', 'values' => array(), 'params' => array()), 'scope3' => array('prefix' => 'scope3', 'absolute' => false, 'host' => null, 'scheme' => null, 'base' => null, 'pattern' => '@^/scope3/@', 'library' => 'scope3', 'values' => array(), 'params' => array()));
$this->assertEqual($expected, Router::attached());
}