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
cc625e24
Commit
cc625e24
authored
Sep 29, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaning up the cache class.
parent
1fb70a85
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
manager.php
laravel/cache/manager.php
+17
-1
No files found.
laravel/cache/manager.php
View file @
cc625e24
...
@@ -17,6 +17,14 @@ class Manager {
...
@@ -17,6 +17,14 @@ class Manager {
* If no driver name is specified, the default cache driver will be returned
* If no driver name is specified, the default cache driver will be returned
* as defined in the cache configuration file.
* as defined in the cache configuration file.
*
*
* <code>
* // Get the default cache driver instance
* $driver = Cache::driver();
*
* // Get a specific cache driver instance by name
* $driver = Cache::driver('memcached');
* </code>
*
* @param string $driver
* @param string $driver
* @return Cache\Driver
* @return Cache\Driver
*/
*/
...
@@ -31,7 +39,7 @@ class Manager {
...
@@ -31,7 +39,7 @@ class Manager {
throw
new
\Exception
(
"Cache driver [
$driver
] is not supported."
);
throw
new
\Exception
(
"Cache driver [
$driver
] is not supported."
);
}
}
return
static
::
$drivers
[
$driver
]
=
IoC
::
container
()
->
resolve
(
'laravel.
cache.'
.
$driver
);
return
static
::
$drivers
[
$driver
]
=
IoC
::
container
()
->
core
(
'
cache.'
.
$driver
);
}
}
return
static
::
$drivers
[
$driver
];
return
static
::
$drivers
[
$driver
];
...
@@ -42,6 +50,14 @@ class Manager {
...
@@ -42,6 +50,14 @@ class Manager {
*
*
* Passing method calls to the driver instance provides a convenient API for the developer
* Passing method calls to the driver instance provides a convenient API for the developer
* when always using the default cache driver.
* when always using the default cache driver.
*
* <code>
* // Call the "get" method on the default driver
* $name = Cache::get('name');
*
* // Call the "put" method on the default driver
* Cache::put('name', 'Taylor', 15);
* </code>
*/
*/
public
static
function
__callStatic
(
$method
,
$parameters
)
public
static
function
__callStatic
(
$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