当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Controller_Router_Rewrite::addRoutes方法代码示例

本文整理汇总了PHP中Zend_Controller_Router_Rewrite::addRoutes方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Controller_Router_Rewrite::addRoutes方法的具体用法?PHP Zend_Controller_Router_Rewrite::addRoutes怎么用?PHP Zend_Controller_Router_Rewrite::addRoutes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Controller_Router_Rewrite的用法示例。


在下文中一共展示了Zend_Controller_Router_Rewrite::addRoutes方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _getRouterInstance

 protected function _getRouterInstance()
 {
     $routes = array('default' => $this->_getRoute('*', self::CONTROLLER_INDEX), self::ROUTE_INDEX => $this->_getRoute('form-to-mail', self::CONTROLLER_INDEX), self::ROUTE_CONFIRM => $this->_getRoute('form-to-mail/confirm', self::CONTROLLER_INDEX), self::ROUTE_LOGIN => $this->_getRoute('form-to-mail/login', self::CONTROLLER_LOGIN));
     require_once 'Zend/Controller/Router/Rewrite.php';
     $router = new Zend_Controller_Router_Rewrite();
     $router->removeDefaultRoutes();
     $router->addRoutes($routes);
     return $router;
 }
开发者ID:sitengine,项目名称:sitengine,代码行数:9,代码来源:Front.php

示例2: _getRouterInstance

 protected function _getRouterInstance()
 {
     $path = $this->getServicePath();
     $routes = array('default' => $this->_getRoute('*', self::CONTROLLER_USER), self::ROUTE_USER => $this->_getRoute("{$path}/user", self::CONTROLLER_USER), self::ROUTE_USER_NEW => $this->_getRoute("{$path}/join", self::CONTROLLER_USER), self::ROUTE_LOGIN => $this->_getRoute("{$path}/login", self::CONTROLLER_LOGIN));
     require_once 'Zend/Controller/Router/Rewrite.php';
     $router = new Zend_Controller_Router_Rewrite();
     $router->removeDefaultRoutes();
     $router->addRoutes($routes);
     return $router;
 }
开发者ID:sitengine,项目名称:sitengine,代码行数:10,代码来源:Front.php

示例3: _getRouterInstance

 protected function _getRouterInstance()
 {
     require_once 'Zend/Controller/Router/Route.php';
     $routes = array('default' => new Zend_Controller_Router_Route('*', array(Sitengine_Env::PARAM_CONTROLLER => $this->getController(self::CONTROLLER_INDEX), Sitengine_Env::PARAM_ACTION => 'index')), self::ROUTE_INDEX => new Zend_Controller_Router_Route('backend/sitemap/:' . Sitengine_Env::PARAM_ACTION . '/*', array(Sitengine_Env::PARAM_CONTROLLER => $this->getController(self::CONTROLLER_INDEX), Sitengine_Env::PARAM_ACTION => 'index')), self::ROUTE_LOGIN => new Zend_Controller_Router_Route('backend/sitemap/login', array(Sitengine_Env::PARAM_CONTROLLER => $this->getController(self::CONTROLLER_LOGIN), Sitengine_Env::PARAM_ACTION => 'index')));
     require_once 'Zend/Controller/Router/Rewrite.php';
     $router = new Zend_Controller_Router_Rewrite();
     $router->removeDefaultRoutes();
     $router->addRoutes($routes);
     return $router;
 }
开发者ID:sitengine,项目名称:sitengine,代码行数:10,代码来源:Front.php

示例4: _getRouterInstance

 protected function _getRouterInstance()
 {
     $path = $this->getServicePath();
     $routes = array('default' => $this->_getRoute('*', self::CONTROLLER_CAMPAIGNS), self::ROUTE_CAMPAIGNS => $this->_getRoute("{$path}/campaigns", self::CONTROLLER_CAMPAIGNS), self::ROUTE_CAMPAIGNS_SHARP => $this->_getRoute("{$path}/campaigns/:id", self::CONTROLLER_CAMPAIGNS), self::ROUTE_SUBSCRIPTIONS_SUBSCRIBE => $this->_getRoute("{$path}/subscriptions", self::CONTROLLER_SUBSCRIPTIONS), self::ROUTE_SUBSCRIPTIONS_UNSUBSCRIBE => $this->_getRoute("{$path}/subscriptions/unsubscribe", self::CONTROLLER_SUBSCRIPTIONS), self::ROUTE_SUBSCRIPTIONS_CONFIRM_OPTIN => $this->_getRoute("{$path}/subscriptions/confirm/optin", self::CONTROLLER_SUBSCRIPTIONS), self::ROUTE_SUBSCRIPTIONS_CONFIRM_FINAL => $this->_getRoute("{$path}/subscriptions/confirm/final", self::CONTROLLER_SUBSCRIPTIONS), self::ROUTE_SUBSCRIPTIONS_CONFIRM_UNSUBSCRIBE => $this->_getRoute("{$path}/subscriptions/confirm/unsubscribe", self::CONTROLLER_SUBSCRIPTIONS));
     require_once 'Zend/Controller/Router/Rewrite.php';
     $router = new Zend_Controller_Router_Rewrite();
     $router->removeDefaultRoutes();
     $router->addRoutes($routes);
     return $router;
 }
开发者ID:sitengine,项目名称:sitengine,代码行数:10,代码来源:Front.php

示例5: getRouter

 public static function getRouter()
 {
     /* @var $router Zend_Controller_Router_Rewrite */
     $router = new \Zend_Controller_Router_Rewrite();
     $routes = array();
     $routes['watch'] = new \Zend_Controller_Router_Route('watch/:id/:name', array('controller' => 'watch', 'action' => 'index', 'id' => "0", 'name' => ''));
     $routes['category'] = new \Zend_Controller_Router_Route('category/:categoryId/:page', array('controller' => 'category', 'action' => 'index', 'categoryId' => "0", 'page' => '1'));
     $routes['latest-update'] = new \Zend_Controller_Router_Route('latest-update/:page', array('controller' => 'index', 'action' => 'index', 'page' => "1"));
     $router->addRoutes($routes);
     return $router;
 }
开发者ID:jay45,项目名称:porn,代码行数:11,代码来源:MyRouterConfiguration.php

示例6: _setRouter

 /**
  * set router
  */
 protected function _setRouter()
 {
     if (null === self::$_router) {
         self::$_router = new Zend_Controller_Router_Rewrite();
         $route_project = new Zend_Controller_Router_Route_Regex('index.php/project/(\\d+)', array('controller' => 'project', 'action' => 'view'), array(1 => 'id'));
         $route_project_list = new Zend_Controller_Router_Route_Regex('project/list/(\\d+)', array('controller' => 'Index', 'action' => 'list', 'module' => 'project'), array(1 => 'page'), 'project/list/%d');
         $route_user_login = new Zend_Controller_Router_Route_Regex('user/login', array('module' => 'user', 'controller' => 'index', 'action' => 'login'));
         $route_user_logout = new Zend_Controller_Router_Route_Regex('user/logout', array('module' => 'user', 'controller' => 'index', 'action' => 'logout'));
         $route_user_list = new Zend_Controller_Router_Route_Regex('user/list/(\\d+)', array('module' => 'user', 'controller' => 'Index', 'action' => 'list'), array(1 => 'page'), 'user/list/%d');
         $route_user_edit = new Zend_Controller_Router_Route_Regex('user/edit', array('module' => 'user', 'controller' => 'index', 'action' => 'edit'));
         $route_user_edit_id = new Zend_Controller_Router_Route_Regex('user/edit/(\\d+)', array('module' => 'user', 'controller' => 'index', 'action' => 'edit'), array(1 => 'id'));
         $route_user_save = new Zend_Controller_Router_Route_Regex('user/save', array('module' => 'user', 'controller' => 'index', 'action' => 'save'));
         self::$_router->addRoutes(array($route_project, $route_user_login, $route_user_logout, $route_user_list, $route_user_edit, $route_user_edit_id, $route_user_save));
     }
 }
开发者ID:victorli,项目名称:ShrimpProject,代码行数:18,代码来源:Application.php

示例7: _getRouterInstance

 protected function _getRouterInstance()
 {
     $path = $this->getServicePath();
     $routes = array('default' => $this->_getRoute('*', self::CONTROLLER_GOODIES), self::ROUTE_LOGIN => $this->_getRoute("{$path}/login", self::CONTROLLER_LOGIN), self::ROUTE_GOODIES => $this->_getRoute("{$path}/goodies", self::CONTROLLER_GOODIES), self::ROUTE_GOODIES_SHARP => $this->_getRoute("{$path}/goodies/:id", self::CONTROLLER_GOODIES), self::ROUTE_GOODIES_NEW => $this->_getRoute("{$path}/goodies/new", self::CONTROLLER_GOODIES), self::ROUTE_GOODIES_BATCH => $this->_getRoute("{$path}/goodies/batch", self::CONTROLLER_GOODIES), self::ROUTE_GOODIES_UPLOAD => $this->_getRoute("{$path}/goodies/upload", self::CONTROLLER_GOODIES), self::ROUTE_GOODIES_ASSIGN => $this->_getRoute("{$path}/goodies/assign", self::CONTROLLER_GOODIES), self::ROUTE_GOODIES_SHOULDIES => $this->_getRoute("{$path}/goodies/:aid/shouldies", self::CONTROLLER_GOODIES_SHOULDIES), self::ROUTE_GOODIES_SHOULDIES_SHARP => $this->_getRoute("{$path}/goodies/:aid/shouldies/:id", self::CONTROLLER_GOODIES_SHOULDIES), self::ROUTE_GOODIES_SHOULDIES_NEW => $this->_getRoute("{$path}/goodies/:aid/shouldies/new", self::CONTROLLER_GOODIES_SHOULDIES), self::ROUTE_GOODIES_SHOULDIES_BATCH => $this->_getRoute("{$path}/goodies/:aid/shouldies/batch", self::CONTROLLER_GOODIES_SHOULDIES), self::ROUTE_GOODIES_SHOULDIES_UPLOAD => $this->_getRoute("{$path}/goodies/:aid/shouldies/upload", self::CONTROLLER_GOODIES_SHOULDIES), self::ROUTE_GOODIES_SHOULDIES_ASSIGN => $this->_getRoute("{$path}/goodies/:aid/shouldies/assign", self::CONTROLLER_GOODIES_SHOULDIES), self::ROUTE_GOODIES_SHOULDIES_COULDIES => $this->_getRoute("{$path}/goodies/:gaid/shouldies/:aid/couldies", self::CONTROLLER_GOODIES_SHOULDIES_COULDIES), self::ROUTE_GOODIES_SHOULDIES_COULDIES_SHARP => $this->_getRoute("{$path}/goodies/:gaid/shouldies/:aid/couldies/:id", self::CONTROLLER_GOODIES_SHOULDIES_COULDIES), self::ROUTE_GOODIES_SHOULDIES_COULDIES_NEW => $this->_getRoute("{$path}/goodies/:gaid/shouldies/:aid/couldies/new", self::CONTROLLER_GOODIES_SHOULDIES_COULDIES), self::ROUTE_GOODIES_SHOULDIES_COULDIES_BATCH => $this->_getRoute("{$path}/goodies/:gaid/shouldies/:aid/couldies/batch", self::CONTROLLER_GOODIES_SHOULDIES_COULDIES), self::ROUTE_GOODIES_SHOULDIES_COULDIES_UPLOAD => $this->_getRoute("{$path}/goodies/:gaid/shouldies/:aid/couldies/upload", self::CONTROLLER_GOODIES_SHOULDIES_COULDIES), self::ROUTE_GOODIES_SHOULDIES_COULDIES_ASSIGN => $this->_getRoute("{$path}/goodies/:gaid/shouldies/:aid/couldies/assign", self::CONTROLLER_GOODIES_SHOULDIES_COULDIES));
     require_once 'Zend/Controller/Router/Rewrite.php';
     $router = new Zend_Controller_Router_Rewrite();
     $router->removeDefaultRoutes();
     $router->addRoutes($routes);
     return $router;
 }
开发者ID:sitengine,项目名称:sitengine,代码行数:10,代码来源:Front.php

示例8: _getRouterInstance

 protected function _getRouterInstance()
 {
     $routes = $this->getBlogPackage()->getBlogSlug() === null ? $this->_getMultiStreamRoutes() : $this->_getSingleStreamRoutes();
     require_once 'Zend/Controller/Router/Rewrite.php';
     $router = new Zend_Controller_Router_Rewrite();
     $router->removeDefaultRoutes();
     $router->addRoutes($routes);
     return $router;
 }
开发者ID:sitengine,项目名称:sitengine,代码行数:9,代码来源:Front.php


注:本文中的Zend_Controller_Router_Rewrite::addRoutes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。