Browse Source

moved routing classes into system namespace.

Taylor Otwell 13 years ago
parent
commit
83ace2de68
5 changed files with 10 additions and 10 deletions
  1. 2 2
      public/index.php
  2. 2 2
      system/route.php
  3. 2 2
      system/route_filter.php
  4. 2 2
      system/route_finder.php
  5. 2 2
      system/url.php

+ 2 - 2
public/index.php

@@ -138,7 +138,7 @@ if (System\Config::get('session.driver') != '')
 // --------------------------------------------------------------
 // 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.
@@ -157,7 +157,7 @@ else
 // ----------------------------------------------------------
 // Execute the global "after" filter.
 // ----------------------------------------------------------
-System\Route\Filter::call('after', array($response));
+System\Route_Filter::call('after', array($response));
 
 // ----------------------------------------------------------
 // Stringify the response.

+ 2 - 2
system/route.php

@@ -55,7 +55,7 @@ class Route {
 		}
 		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']))
 			{
@@ -67,7 +67,7 @@ class Route {
 
 		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;

+ 2 - 2
system/route/filter.php → system/route_filter.php

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

+ 2 - 2
system/route/finder.php → system/route_finder.php

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

+ 2 - 2
system/url.php

@@ -71,7 +71,7 @@ class URL {
 	 */
 	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));
 
@@ -109,7 +109,7 @@ class URL {
 	 */
 	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.
 		$title = preg_replace('![^'.preg_quote($separator).'\pL\pN\s]+!u', '', Str::lower($title));