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
5cc7c3a6
Commit
5cc7c3a6
authored
Sep 29, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring.
parent
3dbc60ae
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
17 deletions
+17
-17
cookie.php
laravel/cookie.php
+2
-2
facades.php
laravel/facades.php
+6
-6
form.php
laravel/form.php
+2
-2
input.php
laravel/input.php
+1
-1
laravel.php
laravel/laravel.php
+6
-6
No files found.
laravel/cookie.php
View file @
5cc7c3a6
...
@@ -40,7 +40,7 @@ class Cookie {
...
@@ -40,7 +40,7 @@ class Cookie {
*/
*/
public
function
get
(
$name
,
$default
=
null
)
public
function
get
(
$name
,
$default
=
null
)
{
{
return
Arr
::
get
(
$
_COOKIE
,
$name
,
$default
);
return
Arr
::
get
(
$
this
->
cookies
,
$name
,
$default
);
}
}
/**
/**
...
@@ -81,7 +81,7 @@ class Cookie {
...
@@ -81,7 +81,7 @@ class Cookie {
{
{
if
(
headers_sent
())
return
false
;
if
(
headers_sent
())
return
false
;
if
(
$minutes
<
0
)
unset
(
$
_COOKIE
[
$name
]);
if
(
$minutes
<
0
)
unset
(
$
this
->
cookies
[
$name
]);
// Since PHP needs the cookie lifetime in seconds, we will calculate it here.
// Since PHP needs the cookie lifetime in seconds, we will calculate it here.
// A "0" lifetime means the cookie expires when the browser closes.
// A "0" lifetime means the cookie expires when the browser closes.
...
...
laravel/facades.php
View file @
5cc7c3a6
...
@@ -32,12 +32,12 @@ abstract class Facade {
...
@@ -32,12 +32,12 @@ abstract class Facade {
}
}
class
Auth
extends
Facade
{
public
static
$resolve
=
'laravel.auth'
;
}
class
Auth
extends
Facade
{
public
static
$resolve
=
'laravel.auth'
;
}
class
Cookie
extends
Facade
{
public
static
$resolve
=
'laravel.cookie'
;
}
class
Cookie
extends
Facade
{
public
static
$resolve
=
'laravel.cookie'
;
}
class
Crypter
extends
Facade
{
public
static
$resolve
=
'laravel.crypter'
;
}
class
Crypter
extends
Facade
{
public
static
$resolve
=
'laravel.crypter'
;
}
class
Hasher
extends
Facade
{
public
static
$resolve
=
'laravel.hasher'
;
}
class
Hasher
extends
Facade
{
public
static
$resolve
=
'laravel.hasher'
;
}
class
Input
extends
Facade
{
public
static
$resolve
=
'laravel.input'
;
}
class
Input
extends
Facade
{
public
static
$resolve
=
'laravel.input'
;
}
class
Request
extends
Facade
{
public
static
$resolve
=
'laravel.request'
;
}
class
Request
extends
Facade
{
public
static
$resolve
=
'laravel.request'
;
}
class
Session
extends
Facade
{
public
static
$resolve
=
'laravel.session'
;
}
class
Session
extends
Facade
{
public
static
$resolve
=
'laravel.session'
;
}
class
URI
extends
Facade
{
public
static
$resolve
=
'laravel.uri'
;
}
class
URI
extends
Facade
{
public
static
$resolve
=
'laravel.uri'
;
}
class
View
extends
Facade
{
public
static
$resolve
=
'laravel.view'
;
}
class
View
extends
Facade
{
public
static
$resolve
=
'laravel.view'
;
}
\ No newline at end of file
\ No newline at end of file
laravel/form.php
View file @
5cc7c3a6
...
@@ -80,7 +80,7 @@ class Form {
...
@@ -80,7 +80,7 @@ class Form {
*/
*/
protected
static
function
action
(
$action
,
$https
)
protected
static
function
action
(
$action
,
$https
)
{
{
$uri
=
IoC
::
container
()
->
resolve
(
'laravel.
uri'
)
->
get
();
$uri
=
IoC
::
container
()
->
core
(
'
uri'
)
->
get
();
return
HTML
::
entities
(
URL
::
to
(((
is_null
(
$action
))
?
$uri
:
$action
),
$https
));
return
HTML
::
entities
(
URL
::
to
(((
is_null
(
$action
))
?
$uri
:
$action
),
$https
));
}
}
...
@@ -159,7 +159,7 @@ class Form {
...
@@ -159,7 +159,7 @@ class Form {
throw
new
\Exception
(
"A session driver must be specified before using CSRF tokens."
);
throw
new
\Exception
(
"A session driver must be specified before using CSRF tokens."
);
}
}
return
IoC
::
container
()
->
resolve
(
'laravel.
session'
)
->
get
(
'csrf_token'
);
return
IoC
::
container
()
->
core
(
'
session'
)
->
get
(
'csrf_token'
);
}
}
/**
/**
...
...
laravel/input.php
View file @
5cc7c3a6
...
@@ -116,7 +116,7 @@ class Input {
...
@@ -116,7 +116,7 @@ class Input {
throw
new
\Exception
(
'A session driver must be specified in order to access old input.'
);
throw
new
\Exception
(
'A session driver must be specified in order to access old input.'
);
}
}
$driver
=
IoC
::
container
()
->
resolve
(
'laravel.
session'
);
$driver
=
IoC
::
container
()
->
core
(
'
session'
);
return
Arr
::
get
(
$driver
->
get
(
Input
::
old_input
,
array
()),
$key
,
$default
);
return
Arr
::
get
(
$driver
->
get
(
Input
::
old_input
,
array
()),
$key
,
$default
);
}
}
...
...
laravel/laravel.php
View file @
5cc7c3a6
...
@@ -25,7 +25,7 @@ date_default_timezone_set(Config::get('application.timezone'));
...
@@ -25,7 +25,7 @@ date_default_timezone_set(Config::get('application.timezone'));
*/
*/
if
(
Config
::
get
(
'session.driver'
)
!==
''
)
if
(
Config
::
get
(
'session.driver'
)
!==
''
)
{
{
$session
=
$container
->
resolve
(
'laravel.
session.manager'
);
$session
=
$container
->
core
(
'
session.manager'
);
$container
->
instance
(
'laravel.session'
,
$session
->
payload
(
Config
::
get
(
'session'
)));
$container
->
instance
(
'laravel.session'
,
$session
->
payload
(
Config
::
get
(
'session'
)));
}
}
...
@@ -36,15 +36,15 @@ if (Config::get('session.driver') !== '')
...
@@ -36,15 +36,15 @@ if (Config::get('session.driver') !== '')
* will be called with the current requst instance. If no route is found, the 404
* will be called with the current requst instance. If no route is found, the 404
* response will be returned to the browser.
* response will be returned to the browser.
*/
*/
$request
=
$container
->
resolve
(
'laravel.
request'
);
$request
=
$container
->
core
(
'
request'
);
list
(
$method
,
$uri
)
=
array
(
$request
->
method
(),
$request
->
uri
());
list
(
$method
,
$uri
)
=
array
(
$request
->
method
(),
$request
->
uri
());
$route
=
$container
->
resolve
(
'laravel.
routing.router'
)
->
route
(
$request
,
$method
,
$uri
);
$route
=
$container
->
core
(
'
routing.router'
)
->
route
(
$request
,
$method
,
$uri
);
if
(
!
is_null
(
$route
))
if
(
!
is_null
(
$route
))
{
{
$response
=
$container
->
resolve
(
'laravel.
routing.caller'
)
->
call
(
$route
);
$response
=
$container
->
core
(
'
routing.caller'
)
->
call
(
$route
);
}
}
else
else
{
{
...
@@ -65,9 +65,9 @@ $response->content = $response->render();
...
@@ -65,9 +65,9 @@ $response->content = $response->render();
*/
*/
if
(
isset
(
$session
))
if
(
isset
(
$session
))
{
{
$flash
=
array
(
Input
::
old_input
=>
$container
->
resolve
(
'laravel.
input'
)
->
get
());
$flash
=
array
(
Input
::
old_input
=>
$container
->
core
(
'
input'
)
->
get
());
$session
->
close
(
$container
->
resolve
(
'laravel.
session'
),
Config
::
get
(
'session'
),
$flash
);
$session
->
close
(
$container
->
core
(
'
session'
),
Config
::
get
(
'session'
),
$flash
);
}
}
/**
/**
...
...
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