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
a3401d52
Commit
a3401d52
authored
Jul 06, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning up Cache class.
parent
39d3ccb8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
14 deletions
+4
-14
system/cache.php
+4
-14
No files found.
system/cache.php
View file @
a3401d52
...
...
@@ -10,19 +10,13 @@ class Cache {
private
static
$drivers
=
array
();
/**
* Get
the cache driver instance
.
* Get
a cache driver instance. Cache drivers are singletons
.
*
* @param string $driver
* @return Cache\Driver
*/
public
static
function
driver
(
$driver
=
null
)
{
// --------------------------------------------------
// If the cache driver has already been instantiated,
// we'll just return that existing instance.
//
// Otherwise, we'll instantiate a new one.
// --------------------------------------------------
if
(
!
array_key_exists
(
$driver
,
static
::
$drivers
))
{
if
(
is_null
(
$driver
))
...
...
@@ -41,13 +35,9 @@ class Cache {
*/
public
static
function
__callStatic
(
$method
,
$parameters
)
{
// --------------------------------------------------
// Passing method calls to the driver instance allows
// a better API for the developer.
//
// For instance, instead of saying Cache::driver()->foo(),
// we can now just say Cache::foo().
// --------------------------------------------------
// Passing method calls to the driver instance provides a better API for the
// developer. For instance, instead of saying Cache::driver()->foo(), we can
// now just say Cache::foo().
return
call_user_func_array
(
array
(
static
::
driver
(),
$method
),
$parameters
);
}
...
...
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