Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
a6d487ec
Commit
a6d487ec
authored
Oct 25, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring the uri class.
parent
8443cef3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
redis.php
laravel/redis.php
+2
-2
uri.php
laravel/uri.php
+4
-9
No files found.
laravel/redis.php
View file @
a6d487ec
...
...
@@ -108,7 +108,7 @@ class Redis {
* @param array $parameters
* @return mixed
*/
public
function
do
(
$method
,
$parameters
)
public
function
run
(
$method
,
$parameters
)
{
fwrite
(
$this
->
connection
,
$this
->
command
(
$method
,
$parameters
));
...
...
@@ -139,7 +139,7 @@ class Redis {
*/
public
function
__call
(
$method
,
$parameters
)
{
return
$this
->
do
(
$method
,
$parameters
);
return
$this
->
run
(
$method
,
$parameters
);
}
/**
...
...
laravel/uri.php
View file @
a6d487ec
...
...
@@ -47,27 +47,22 @@ class URI {
/**
* Remove extraneous information from the given request URI.
*
* The application URL will be removed, as well as the application index file
* and the request format. None of these things are used when routing the
* request to a closure or controller, so they can be safely removed.
*
* @param string $uri
* @return string
*/
protected
function
clean
(
$uri
)
{
// The base application URL is removed first. If the application is being
// served out of a sub-directory of the web document root, we need to get
// rid of the folders that are included in the URI.
$uri
=
$this
->
remove
(
$uri
,
parse_url
(
Config
::
$items
[
'application'
][
'url'
],
PHP_URL_PATH
));
// Next, the application index file is removed. The index file has nothing
// to do with how the request is routed to a closure or controller, so it
// can be safely removed from the URI.
if
((
$index
=
'/'
.
Config
::
$items
[
'application'
][
'index'
])
!==
'/'
)
{
$uri
=
$this
->
remove
(
$uri
,
$index
);
}
// We don't consider the request format to be a part of the request URI.
// The format merely determines in which format the requested resource
// should be returned to the client.
return
rtrim
(
$uri
,
'.'
.
Request
::
format
(
$uri
));
}
...
...
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