Example #1
0
 /**
  * Check if current route is a route of a front page.
  *
  * @static
  * @access     public
  * @return    boolean
  * @since      1.0.0-alpha
  * @version    1.0.0-alpha
  */
 public static function isFrontPage()
 {
     $oHomeRoute = Route::factory('home');
     $sFrontPagePath = $oHomeRoute->path();
     $sCurrentRoutePath = static::currentPath();
     return $sFrontPagePath === $sCurrentRoutePath;
 }
<?php

/**
 * Route file for an application
 *
 * Syntax for this file:
 *
 * 	<route name> => Route::factory()
 *
 * @package   Kohana-Namespace-Routes
 * @copyright 2010 Sittercity, Inc.
 */
return array('default' => Route::factory('(<uri>)', array('uri' => '(.++)'))->defaults(array('controller' => 'page', 'action' => 'index')));
Example #3
0
 /**
  * 执行内部请求
  *+------------
  * @param Void
  * @return Void
  */
 private function internal()
 {
     new Ada_Request_Internal($this, $this->response, Route::factory($this)->parser()->execute());
 }
Example #4
0
 /**
  * 执行内部请求
  * request::factory('welcome/say')->method()->execute();
  * @param Void
  * @return Void
  */
 private function internal()
 {
     new Ada_Request_Internal($this, Route::factory()->routes(Config::load('Route'))->matchs(Uri::pathinfo()));
 }
Example #5
0
<?php

return array('default' => Route::factory('(:controller(/:method(/:id)))')->defaults(array('controller' => 'welcome', 'method' => 'index')));