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
30514d90
Commit
30514d90
authored
Aug 31, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
continued refactoring.
parent
61eced25
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
64 deletions
+13
-64
laravel/cache/manager.php
+1
-1
laravel/cache/memcached.php
+1
-2
laravel/request.php
+6
-6
laravel/response.php
+0
-28
laravel/session/apc.php
+1
-0
laravel/session/manager.php
+4
-3
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
...
...
@@ -156,34 +156,6 @@ class Response {
}
/**
* 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.
*
* @return string
...
...
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
...
...
@@ -94,18 +94,6 @@ class View_Factory {
}
/**
* 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.
*
* @param string $name
...
...
@@ -213,18 +201,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.
*
* If the view has a composer, it will be executed. All sub-views and responses will
...
...
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