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


PHP Zend_Controller_Router_Rewrite::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($prefix)
 {
     parent::__construct();
     $this->AddRoute('admin', new Zend_Controller_Router_Route($prefix . '/:module/:controller/:action', array('module' => 'index', 'controller' => 'index', 'action' => 'index')));
     $this->AddRoute('kwf_welcome', new Zend_Controller_Router_Route('/kwf/welcome/:controller/:action', array('module' => 'kwf_controller_action_welcome', 'controller' => 'index', 'action' => 'index')));
     $this->AddRoute('kwf_user', new Zend_Controller_Router_Route('/kwf/user/:controller/:action', array('module' => 'kwf_controller_action_user', 'action' => 'index')));
     $this->AddRoute('kwf_error', new Zend_Controller_Router_Route('/kwf/error/:controller/:action', array('module' => 'kwf_controller_action_error')));
     $this->AddRoute('kwf_start', new Zend_Controller_Router_Route('/kwf/start', array('module' => 'kwf_controller_action_welcome', 'controller' => 'start', 'action' => 'index')));
     $this->AddRoute('kwf_pool', new Zend_Controller_Router_Route('/kwf/pool/:controller/:action', array('module' => 'kwf_controller_action_pool', 'controller' => 'pools', 'action' => 'index')));
     $this->AddRoute('kwf_debug', new Zend_Controller_Router_Route('/kwf/debug/:controller/:action', array('module' => 'kwf_controller_action_debug', 'controller' => 'index', 'action' => 'index')));
     $this->AddRoute('kwf_media', new Zend_Controller_Router_Route('/kwf/media/:controller/:action', array('module' => 'kwf_controller_action_media', 'controller' => 'index', 'action' => 'index')));
     $this->AddRoute('kwf_spam', new Zend_Controller_Router_Route('/kwf/spam/:controller/:action', array('module' => 'kwf_controller_action_spam', 'action' => 'index')));
     $this->AddRoute('kwf_enquiries', new Zend_Controller_Router_Route('/kwf/enquiries/:controller/:action', array('module' => 'kwf_controller_action_enquiries', 'action' => 'index')));
     $this->AddRoute('kwf_redirects', new Zend_Controller_Router_Route('/kwf/redirects/:controller/:action', array('module' => 'kwf_controller_action_redirects', 'action' => 'index')));
     $this->AddRoute('kwf_maintenance', new Zend_Controller_Router_Route('/kwf/maintenance/:controller/:action', array('module' => 'kwf_controller_action_maintenance', 'action' => 'index')));
     $this->AddRoute('kwf_component', new Zend_Controller_Router_Route('/kwf/component/:controller/:action', array('module' => 'kwf_controller_action_component', 'action' => 'index')));
     $apiRoute = new Zend_Controller_Router_Route('api');
     $restRoute = new Kwf_Rest_Route($this->getFrontController(), array('module' => 'api'), array('api'));
     $chainedRoute = new Kwf_Controller_Router_Route_Chain();
     $chainedRoute->chain($apiRoute)->chain($restRoute);
     $this->addRoute('api', $chainedRoute);
     //Komponenten routes
     if ($prefix) {
         $prefix = '/' . $prefix;
         $this->AddRoute('welcome', new Zend_Controller_Router_Route($prefix . '', array('module' => 'kwf_controller_action_welcome', 'controller' => 'welcome', 'action' => 'index')));
     }
     $this->AddRoute('component', new Zend_Controller_Router_Route($prefix . '/component/:controller/:action', array('module' => 'kwf_controller_action_component', 'action' => 'index')));
     $this->AddRoute('components', new Zend_Controller_Router_Route($prefix . '/components/:action', array('module' => 'kwf_controller_action_component', 'controller' => 'components', 'action' => 'index')));
     $this->AddRoute('componentshow', new Zend_Controller_Router_Route($prefix . '/component/show/:class/:componentId', array('componentId' => null, 'module' => 'kwf_controller_action_component', 'controller' => 'components', 'action' => 'show')));
     $this->AddRoute('componentedit', new Zend_Controller_Router_Route($prefix . '/component/edit/:class/:componentController/:action', array('module' => 'component', 'controller' => 'component', 'action' => 'index')));
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:31,代码来源:Router.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $this->removeDefaultRoutes();
     $this->addRoute('deal-listing', new Zend_Controller_Router_Route('deal/:id/listing.jpg', array('controller' => 'deal', 'action' => 'thumb', 'width' => 75, 'height' => 75, 'crop' => false, 'filename' => 'listing.jpg'), array('id' => '\\d+')));
     $this->addRoute('deal-detail', new Zend_Controller_Router_Route('deal/:id/detail.jpg', array('controller' => 'deal', 'action' => 'thumb', 'width' => 250, 'height' => 250, 'crop' => false, 'filename' => 'detail.jpg'), array('id' => '\\d+')));
 }
开发者ID:neilgarb,项目名称:yadda,代码行数:7,代码来源:Router.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $this->removeDefaultRoutes();
     $this->addRoute('home', new Zend_Controller_Router_Route('', array('controller' => 'index', 'action' => 'index')));
     $this->addRoute('search', new Zend_Controller_Router_Route('search', array('controller' => 'deal', 'action' => 'search')));
     $this->addRoute('deal', new Zend_Controller_Router_Route('deal/:id', array('controller' => 'deal', 'action' => 'view'), array('id' => '\\d+')));
     $this->addRoute('contact', new Zend_Controller_Router_Route('contact', array('controller' => 'index', 'action' => 'contact')));
 }
开发者ID:neilgarb,项目名称:yadda,代码行数:9,代码来源:Router.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $this->addRoute('register', new Zend_Controller_Router_Route('register', array('controller' => 'user', 'action' => 'register')));
     $this->addRoute('login', new Zend_Controller_Router_Route('login', array('controller' => 'user', 'action' => 'login')));
     $this->addRoute('logout', new Zend_Controller_Router_Route('logout', array('controller' => 'user', 'action' => 'logout')));
     $this->addRoute('user', new Zend_Controller_Router_Route('users/:id', array('controller' => 'user', 'action' => 'view'), array('id' => '\\d+')));
     $this->addRoute('applications', new Zend_Controller_Router_Route('applications', array('controller' => 'application', 'action' => 'index')));
     $this->addRoute('application-new', new Zend_Controller_Router_Route('applications/new', array('controller' => 'application', 'action' => 'new')));
     $this->addRoute('application', new Zend_Controller_Router_Route('applications/:id', array('controller' => 'application', 'action' => 'view'), array('id' => '\\d+')));
     $this->addRoute('template-new', new Zend_Controller_Router_Route('templates/new', array('controller' => 'template', 'action' => 'new')));
     $this->addRoute('template', new Zend_Controller_Router_Route('templates/:id', array('controller' => 'template', 'action' => 'view'), array('id' => '\\d+')));
     $this->addRoute('api-template-register', new Zend_Controller_Router_Route('api/template.register', array('module' => 'api', 'controller' => 'template', 'action' => 'register')));
     $this->addRoute('api-event-submit', new Zend_Controller_Router_Route('api/event.submit', array('module' => 'api', 'controller' => 'event', 'action' => 'submit')));
 }
开发者ID:neilgarb,项目名称:myqron,代码行数:15,代码来源:Router.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $this->removeDefaultRoutes();
     $this->addRoute('home', new Zend_Controller_Router_Route('', array('controller' => 'index', 'action' => 'index')));
     $this->addRoute('deal', new Zend_Controller_Router_Route('deal/:id', array('controller' => 'deal', 'action' => 'view')), array('id' => '\\d+'));
     $this->addRoute('deal/vote', new Zend_Controller_Router_Route('vote/:id', array('controller' => 'deal', 'action' => 'vote')), array('id' => '\\d+'));
     $this->addRoute('search', new Zend_Controller_Router_Route('search', array('controller' => 'deal', 'action' => 'search')));
     $this->addRoute('rss', new Zend_Controller_Router_Route('deals.rss', array('controller' => 'deal', 'action' => 'rss')));
     $this->addRoute('map', new Zend_Controller_Router_Route('map', array('controller' => 'map', 'action' => 'index')));
     $this->addRoute('mailer', new Zend_Controller_Router_Route('mailer', array('controller' => 'deal', 'action' => 'mailer')));
     $this->addRoute('subscribe', new Zend_Controller_Router_Route('subscribe', array('controller' => 'subscription', 'action' => 'subscribe')));
     $this->addRoute('unsubscribe', new Zend_Controller_Router_Route('unsubscribe', array('controller' => 'subscription', 'action' => 'unsubscribe')));
     $this->addRoute('contact', new Zend_Controller_Router_Route('contact', array('controller' => 'index', 'action' => 'contact')));
     $this->addRoute('ajax/deal/search', new Zend_Controller_Router_Route('ajax/deal/search', array('controller' => 'deal', 'action' => 'ajax-search')));
     $this->addRoute('ajax/map/findDealsByMapBounds', new Zend_Controller_Router_Route('ajax/map/findDealsByMapBounds', array('controller' => 'map', 'action' => 'ajax-find-deals-by-map-bounds')));
     $this->addRoute('sitemap', new Zend_Controller_Router_Route('sitemap.xml', array('controller' => 'index', 'action' => 'sitemap')));
     $this->addRoute('bot', new Zend_Controller_Router_Route('bot', array('controller' => 'index', 'action' => 'bot')));
 }
开发者ID:neilgarb,项目名称:yadda,代码行数:19,代码来源:Router.php

示例6: array

 function __construct()
 {
     parent::__construct();
     // index
     $this->addRoute('home', new Zend_Controller_Router_Route('', array('controller' => 'posts', 'action' => 'index')));
     // about
     $this->addRoute('about', new Zend_Controller_Router_Route('about', array('controller' => 'index', 'action' => 'about')));
     // spam
     $this->addRoute('spam', new Zend_Controller_Router_Route('spam', array('controller' => 'index', 'action' => 'spam')));
     // sitemap
     $this->addRoute('sitemap', new Zend_Controller_Router_Route('sitemap.xml', array('controller' => 'index', 'action' => 'sitemap')));
     // post > archive
     $this->addRoute('post_archive_year', new Zend_Controller_Router_Route('posts/:year/:month', array('controller' => 'posts', 'action' => 'archive'), array('year' => '\\d{4,4}', 'month' => '[01][0-9]')));
     // post > view
     $this->addRoute('post', new Zend_Controller_Router_Route('posts/:label', array('controller' => 'posts', 'action' => 'view')));
     // post > comment
     $this->addRoute('post_comment', new Zend_Controller_Router_Route('posts/:label/comment', array('controller' => 'posts', 'action' => 'comment')));
     // rss
     $this->addRoute('rss', new Zend_Controller_Router_Route('rss', array('controller' => 'posts', 'action' => 'rss')));
     // post > rss
     $this->addRoute('post_rss', new Zend_Controller_Router_Route('posts/:label/rss', array('controller' => 'posts', 'action' => 'commentrss')));
     // tag > view
     $this->addRoute('tag', new Zend_Controller_Router_Route('tags/:label', array('controller' => 'tags', 'action' => 'view')));
 }
开发者ID:neilgarb,项目名称:codecaine,代码行数:24,代码来源:Router.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
 }
开发者ID:neilgarb,项目名称:yadda,代码行数:4,代码来源:Router.php


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