Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
83ace2de
Commit
83ace2de
authored
Jul 31, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved routing classes into system namespace.
parent
ce96fb67
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
public/index.php
+2
-2
system/route.php
+2
-2
system/route_filter.php
+2
-2
system/route_finder.php
+2
-2
system/url.php
+2
-2
No files found.
public/index.php
View file @
83ace2de
...
@@ -138,7 +138,7 @@ if (System\Config::get('session.driver') != '')
...
@@ -138,7 +138,7 @@ if (System\Config::get('session.driver') != '')
// --------------------------------------------------------------
// --------------------------------------------------------------
// 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 @@ else
...
@@ -157,7 +157,7 @@ else
// ----------------------------------------------------------
// ----------------------------------------------------------
// 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.
...
...
system/route.php
View file @
83ace2de
...
@@ -55,7 +55,7 @@ class Route {
...
@@ -55,7 +55,7 @@ class Route {
}
}
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 @@ class Route {
...
@@ -67,7 +67,7 @@ class Route {
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
;
...
...
system/route
/
filter.php
→
system/route
_
filter.php
View file @
83ace2de
<?php
namespace
System
\Route
;
<?php
namespace
System
;
class
Filter
{
class
Route_
Filter
{
/**
/**
* The loaded route filters.
* The loaded route filters.
...
...
system/route
/
finder.php
→
system/route
_
finder.php
View file @
83ace2de
<?php
namespace
System
\Route
;
<?php
namespace
System
;
class
Finder
{
class
Route_
Finder
{
/**
/**
* All of the loaded routes.
* All of the loaded routes.
...
...
system/url.php
View file @
83ace2de
...
@@ -71,7 +71,7 @@ class URL {
...
@@ -71,7 +71,7 @@ class 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 @@ class URL {
...
@@ -109,7 +109,7 @@ class URL {
*/
*/
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
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment