moved routing classes into system namespace.

This commit is contained in:
Taylor Otwell 2011-07-31 13:14:39 -05:00
parent ce96fb6717
commit 83ace2de68
5 changed files with 10 additions and 10 deletions

View File

@ -138,7 +138,7 @@
// -------------------------------------------------------------- // --------------------------------------------------------------
// Execute the global "before" filter. // Execute the global "before" filter.
// -------------------------------------------------------------- // --------------------------------------------------------------
$response = System\Route\Filter::call('before', array(), true); $response = System\Route_Filter::call('before', array(), true);
// ---------------------------------------------------------- // ----------------------------------------------------------
// Execute the route function. // Execute the route function.
@ -157,7 +157,7 @@
// ---------------------------------------------------------- // ----------------------------------------------------------
// Execute the global "after" filter. // Execute the global "after" filter.
// ---------------------------------------------------------- // ----------------------------------------------------------
System\Route\Filter::call('after', array($response)); System\Route_Filter::call('after', array($response));
// ---------------------------------------------------------- // ----------------------------------------------------------
// Stringify the response. // Stringify the response.

View File

@ -55,7 +55,7 @@ public function call()
} }
elseif (is_array($this->callback)) elseif (is_array($this->callback))
{ {
$response = isset($this->callback['before']) ? Route\Filter::call($this->callback['before'], array(), true) : null; $response = isset($this->callback['before']) ? Route_Filter::call($this->callback['before'], array(), true) : null;
if (is_null($response) and isset($this->callback['do'])) if (is_null($response) and isset($this->callback['do']))
{ {
@ -67,7 +67,7 @@ public function call()
if (is_array($this->callback) and isset($this->callback['after'])) if (is_array($this->callback) and isset($this->callback['after']))
{ {
Route\Filter::call($this->callback['after'], array($response)); Route_Filter::call($this->callback['after'], array($response));
} }
return $response; return $response;

View File

@ -1,6 +1,6 @@
<?php namespace System\Route; <?php namespace System;
class Filter { class Route_Filter {
/** /**
* The loaded route filters. * The loaded route filters.

View File

@ -1,6 +1,6 @@
<?php namespace System\Route; <?php namespace System;
class Finder { class Route_Finder {
/** /**
* All of the loaded routes. * All of the loaded routes.

View File

@ -71,7 +71,7 @@ public static function to_asset($url)
*/ */
public static function to_route($name, $parameters = array(), $https = false) public static function to_route($name, $parameters = array(), $https = false)
{ {
if ( ! is_null($route = Route\Finder::find($name))) if ( ! is_null($route = Route_Finder::find($name)))
{ {
$uris = explode(', ', key($route)); $uris = explode(', ', key($route));
@ -109,7 +109,7 @@ public static function to_secure_route($name, $parameters = array())
*/ */
public static function slug($title, $separator = '-') public static function slug($title, $separator = '-')
{ {
$title = html_entity_decode(Str::ascii($title), ENT_QUOTES, Config::get('application.encoding')); $title = Str::ascii($title);
// Remove all characters that are not the separator, letters, numbers, or whitespace. // Remove all characters that are not the separator, letters, numbers, or whitespace.
$title = preg_replace('![^'.preg_quote($separator).'\pL\pN\s]+!u', '', Str::lower($title)); $title = preg_replace('![^'.preg_quote($separator).'\pL\pN\s]+!u', '', Str::lower($title));