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
1a82d9c5
Commit
1a82d9c5
authored
Jul 06, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed usage of Arr from Request class.
parent
f8b12b5d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
16 deletions
+4
-16
request.php
system/request.php
+4
-16
No files found.
system/request.php
View file @
1a82d9c5
...
@@ -28,16 +28,10 @@ class Request {
...
@@ -28,16 +28,10 @@ class Request {
return
static
::
$uri
;
return
static
::
$uri
;
}
}
// -------------------------------------------------------
// Use the PATH_INFO variable if it is available.
// -------------------------------------------------------
if
(
isset
(
$_SERVER
[
'PATH_INFO'
]))
if
(
isset
(
$_SERVER
[
'PATH_INFO'
]))
{
{
$uri
=
$_SERVER
[
'PATH_INFO'
];
$uri
=
$_SERVER
[
'PATH_INFO'
];
}
}
// -------------------------------------------------------
// No PATH_INFO? Let's try REQUEST_URI.
// -------------------------------------------------------
elseif
(
isset
(
$_SERVER
[
'REQUEST_URI'
]))
elseif
(
isset
(
$_SERVER
[
'REQUEST_URI'
]))
{
{
$uri
=
parse_url
(
$_SERVER
[
'REQUEST_URI'
],
PHP_URL_PATH
);
$uri
=
parse_url
(
$_SERVER
[
'REQUEST_URI'
],
PHP_URL_PATH
);
...
@@ -84,15 +78,14 @@ class Request {
...
@@ -84,15 +78,14 @@ class Request {
/**
/**
* Get the request method.
* Get the request method.
*
*
* The request method may be spoofed if a hidden "REQUEST_METHOD" POST element
* is present, allowing HTML forms to simulate PUT and DELETE requests.
*
* @return string
* @return string
*/
*/
public
static
function
method
()
public
static
function
method
()
{
{
// --------------------------------------------------------------
return
(
array_key_exists
(
'REQUEST_METHOD'
,
$_POST
))
?
$_POST
[
'REQUEST_METHOD'
]
:
$_SERVER
[
'REQUEST_METHOD'
];
// The method can be spoofed using a POST variable, allowing HTML
// forms to simulate PUT and DELETE requests.
// --------------------------------------------------------------
return
Arr
::
get
(
$_POST
,
'REQUEST_METHOD'
,
$_SERVER
[
'REQUEST_METHOD'
]);
}
}
/**
/**
...
@@ -162,11 +155,6 @@ class Request {
...
@@ -162,11 +155,6 @@ class Request {
*/
*/
public
static
function
__callStatic
(
$method
,
$parameters
)
public
static
function
__callStatic
(
$method
,
$parameters
)
{
{
// --------------------------------------------------------------
// Dynamically call the "is" method using the given name.
//
// Example: Request::is_login()
// --------------------------------------------------------------
if
(
strpos
(
$method
,
'route_is_'
)
===
0
)
if
(
strpos
(
$method
,
'route_is_'
)
===
0
)
{
{
return
static
::
route_is
(
substr
(
$method
,
9
));
return
static
::
route_is
(
substr
(
$method
,
9
));
...
...
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