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
30514d90
Commit
30514d90
authored
Sep 01, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
continued refactoring.
parent
61eced25
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
64 deletions
+12
-64
manager.php
laravel/cache/manager.php
+1
-1
memcached.php
laravel/cache/memcached.php
+1
-2
request.php
laravel/request.php
+6
-6
response.php
laravel/response.php
+0
-28
apc.php
laravel/session/apc.php
+1
-0
manager.php
laravel/session/manager.php
+3
-3
view.php
laravel/view.php
+0
-24
No files found.
laravel/cache/manager.php
View file @
30514d90
...
...
@@ -52,7 +52,7 @@ class Manager {
if
(
!
array_key_exists
(
$driver
,
$this
->
drivers
))
{
if
(
!
in_array
(
$driver
,
array
(
'apc'
,
'file'
,
'memcached'
)
))
if
(
!
$this
->
container
->
registered
(
'laravel.cache.'
.
$driver
))
{
throw
new
\Exception
(
"Cache driver [
$driver
] is not supported."
);
}
...
...
laravel/cache/memcached.php
View file @
30514d90
<?php
namespace
Laravel\Cache
;
use
Memcache
;
use
Laravel\Config
;
class
Memcached
extends
Driver
{
...
...
@@ -25,7 +24,7 @@ class Memcached extends Driver {
* @param Memcache $memcache
* @return void
*/
public
function
__construct
(
Memcache
$memcache
,
$key
)
public
function
__construct
(
\
Memcache
$memcache
,
$key
)
{
$this
->
key
=
$key
;
$this
->
memcache
=
$memcache
;
...
...
laravel/request.php
View file @
30514d90
...
...
@@ -10,18 +10,18 @@ class Request {
public
$server
;
/**
* The
$_POST array for the
request.
* The
route handling the current
request.
*
* @var
array
* @var
Routing\Route
*/
p
rivate
$post
;
p
ublic
$route
;
/**
* The
route handling the current
request.
* The
$_POST array for the
request.
*
* @var
Routing\Route
* @var
array
*/
p
ublic
$route
;
p
rivate
$post
;
/**
* The base URL of the application.
...
...
laravel/response.php
View file @
30514d90
...
...
@@ -155,34 +155,6 @@ class Response {
$this
->
status
=
$status
;
}
/**
* Create a new response instance.
*
* @param mixed $content
* @param int $status
* @return Response
*/
public
static
function
make
(
$content
,
$status
=
200
)
{
return
IoC
::
container
()
->
resolve
(
'laravel.response'
)
->
make
(
$content
,
$status
);
}
/**
* Create a new error response instance.
*
* The response status code will be set using the specified code.
*
* Note: The specified error code should correspond to a view in your views/error directory.
*
* @param int $code
* @param array $data
* @return Response
*/
public
static
function
error
(
$code
,
$data
=
array
())
{
return
IoC
::
container
()
->
resolve
(
'laravel.response'
)
->
error
(
$code
,
$data
);
}
/**
* Get the evaluated string contents of the response.
*
...
...
laravel/session/apc.php
View file @
30514d90
...
...
@@ -20,6 +20,7 @@ class APC extends Driver {
* Create a new APC session driver instance.
*
* @param Cache\APC $apc
* @param int $lifetime
* @return void
*/
public
function
__construct
(
\Laravel\Cache\APC
$apc
,
$lifetime
)
...
...
laravel/session/manager.php
View file @
30514d90
...
...
@@ -34,12 +34,12 @@ class Manager {
*/
public
function
driver
(
$driver
)
{
if
(
in_array
(
$driver
,
array
(
'cookie'
,
'file'
,
'database'
,
'apc'
,
'memcached'
)
))
if
(
!
$this
->
container
->
registered
(
'laravel.session.'
.
$driver
))
{
return
$this
->
container
->
resolve
(
'laravel.session.'
.
$driver
);
throw
new
\Exception
(
"Session driver [
$driver
] is not supported."
);
}
throw
new
\Exception
(
"Session driver [
$driver
] is not supported."
);
return
$this
->
container
->
resolve
(
'laravel.session.'
.
$driver
);
}
}
\ No newline at end of file
laravel/view.php
View file @
30514d90
...
...
@@ -93,18 +93,6 @@ class View_Factory {
$this
->
composer
=
$composer
;
}
/**
* Create a new view instance.
*
* @param string $view
* @param array $data
* @return View
*/
public
function
make
(
$view
,
$data
=
array
())
{
return
new
View
(
$view
,
$data
,
$this
->
path
(
$view
),
$this
->
composer
,
$this
);
}
/**
* Create a new view instance from a view name.
*
...
...
@@ -212,18 +200,6 @@ class View {
}
}
/**
* Create a new view instance.
*
* @param string $view
* @param array $data
* @return View
*/
public
static
function
make
(
$view
,
$data
=
array
())
{
return
IoC
::
container
()
->
resolve
(
'laravel.view'
)
->
make
(
$view
,
$data
);
}
/**
* Get the evaluated string content of the view.
*
...
...
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