moved routing classes into system namespace.
This commit is contained in:
parent
ce96fb6717
commit
83ace2de68
|
@ -138,7 +138,7 @@
|
|||
// --------------------------------------------------------------
|
||||
// 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 @@
|
|||
// ----------------------------------------------------------
|
||||
// Execute the global "after" filter.
|
||||
// ----------------------------------------------------------
|
||||
System\Route\Filter::call('after', array($response));
|
||||
System\Route_Filter::call('after', array($response));
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Stringify the response.
|
||||
|
|
|
@ -55,7 +55,7 @@ public function call()
|
|||
}
|
||||
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 @@ public function call()
|
|||
|
||||
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;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php namespace System\Route;
|
||||
<?php namespace System;
|
||||
|
||||
class Filter {
|
||||
class Route_Filter {
|
||||
|
||||
/**
|
||||
* The loaded route filters.
|
|
@ -1,6 +1,6 @@
|
|||
<?php namespace System\Route;
|
||||
<?php namespace System;
|
||||
|
||||
class Finder {
|
||||
class Route_Finder {
|
||||
|
||||
/**
|
||||
* All of the loaded routes.
|
|
@ -71,7 +71,7 @@ public static function to_asset($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 @@ public static function to_secure_route($name, $parameters = array())
|
|||
*/
|
||||
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));
|
||||
|
|
Loading…
Reference in New Issue