Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
8b8c2a94
Commit
8b8c2a94
authored
Jan 22, 2012
by
Larry Garfield
Browse files
refs
#1400748
by Crell: Update docblocks and the installer for the new namespaces.
parent
8b0adb6e
Changes
5
Hide whitespace changes
Inline
Side-by-side
core/includes/cache.inc
View file @
8b8c2a94
...
...
@@ -8,10 +8,10 @@
/**
* Instantiates and statically caches the correct class for a cache bin.
*
* By default, this returns an instance of the Drupal\Cache\DatabaseBackend
* By default, this returns an instance of the Drupal\
Core\
Cache\DatabaseBackend
* class.
*
* Classes implementing Drupal\Cache\CacheBackendInterface can register themselves
* Classes implementing Drupal\
Core\
Cache\CacheBackendInterface can register themselves
* both as a default implementation and for specific bins.
*
* @param $bin
...
...
core/includes/install.core.inc
View file @
8b8c2a94
...
...
@@ -277,7 +277,7 @@ function install_begin_request(&$install_state) {
// because any data put in the cache during the installer is inherently
// suspect, due to the fact that Drupal is not fully set up yet.
require_once
DRUPAL_ROOT
.
'/core/includes/cache.inc'
;
$conf
[
'cache_default_class'
]
=
'Drupal\\Cache\
\
InstallBackend'
;
$conf
[
'cache_default_class'
]
=
'Drupal\
Core
\Cache\InstallBackend'
;
// Prepare for themed output. We need to run this at the beginning of the
// page request to avoid a different theme accidentally getting set. (We also
...
...
core/lib/Drupal/Core/Cache/DatabaseBackend.php
View file @
8b8c2a94
...
...
@@ -23,7 +23,7 @@ class DatabaseBackend implements CacheBackendInterface {
protected
$bin
;
/**
* Implements Drupal\Cache\CacheBackendInterface::__construct().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::__construct().
*/
function
__construct
(
$bin
)
{
// All cache tables should be prefixed with 'cache_', except for the
...
...
@@ -35,7 +35,7 @@ function __construct($bin) {
}
/**
* Implements Drupal\Cache\CacheBackendInterface::get().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::get().
*/
function
get
(
$cid
)
{
$cids
=
array
(
$cid
);
...
...
@@ -44,7 +44,7 @@ function get($cid) {
}
/**
* Implements Drupal\Cache\CacheBackendInterface::getMultiple().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::getMultiple().
*/
function
getMultiple
(
&
$cids
)
{
try
{
...
...
@@ -114,7 +114,7 @@ protected function prepareItem($cache) {
}
/**
* Implements Drupal\Cache\CacheBackendInterface::set().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::set().
*/
function
set
(
$cid
,
$data
,
$expire
=
CACHE_PERMANENT
)
{
$fields
=
array
(
...
...
@@ -143,7 +143,7 @@ function set($cid, $data, $expire = CACHE_PERMANENT) {
}
/**
* Implements Drupal\Cache\CacheBackendInterface::delete().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::delete().
*/
function
delete
(
$cid
)
{
db_delete
(
$this
->
bin
)
...
...
@@ -152,7 +152,7 @@ function delete($cid) {
}
/**
* Implements Drupal\Cache\CacheBackendInterface::deleteMultiple().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::deleteMultiple().
*/
function
deleteMultiple
(
Array
$cids
)
{
// Delete in chunks when a large array is passed.
...
...
@@ -165,7 +165,7 @@ function deleteMultiple(Array $cids) {
}
/**
* Implements Drupal\Cache\CacheBackendInterface::deletePrefix().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::deletePrefix().
*/
function
deletePrefix
(
$prefix
)
{
db_delete
(
$this
->
bin
)
...
...
@@ -174,14 +174,14 @@ function deletePrefix($prefix) {
}
/**
* Implements Drupal\Cache\CacheBackendInterface::flush().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::flush().
*/
function
flush
()
{
db_truncate
(
$this
->
bin
)
->
execute
();
}
/**
* Implements Drupal\Cache\CacheBackendInterface::expire().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::expire().
*/
function
expire
()
{
if
(
variable_get
(
'cache_lifetime'
,
0
))
{
...
...
@@ -216,7 +216,7 @@ function expire() {
}
/**
* Implements Drupal\Cache\CacheBackendInterface::garbageCollection().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::garbageCollection().
*/
function
garbageCollection
()
{
global
$user
;
...
...
@@ -236,7 +236,7 @@ function garbageCollection() {
}
/**
* Implements Drupal\Cache\CacheBackendInterface::isEmpty().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::isEmpty().
*/
function
isEmpty
()
{
$this
->
garbageCollection
();
...
...
core/lib/Drupal/Core/Cache/InstallBackend.php
View file @
8b8c2a94
...
...
@@ -34,26 +34,26 @@
class
InstallBackend
extends
DatabaseBackend
{
/**
* Overrides Drupal\C
ache\DatabaseBackend
::get().
* Overrides Drupal\C
ore\Cache\CacheBackendInterface
::get().
*/
function
get
(
$cid
)
{
return
FALSE
;
}
/**
* Overrides Drupal\C
ache\DatabaseBackend
::getMultiple().
* Overrides Drupal\C
ore\Cache\CacheBackendInterface
::getMultiple().
*/
function
getMultiple
(
&
$cids
)
{
return
array
();
}
/**
* Overrides Drupal\C
ache\DatabaseBackend
::set().
* Overrides Drupal\C
ore\Cache\CacheBackendInterface
::set().
*/
function
set
(
$cid
,
$data
,
$expire
=
CACHE_PERMANENT
)
{}
/**
* Implements Drupal\C
ache\DatabaseBackend
::delete().
* Implements Drupal\C
ore\Cache\CacheBackendInterface
::delete().
*/
function
delete
(
$cid
)
{
try
{
...
...
@@ -65,7 +65,7 @@ function delete($cid) {
}
/**
* Implements Drupal\C
ache\DatabaseBackend
::deleteMultiple().
* Implements Drupal\C
ore\Cache\CacheBackendInterface
::deleteMultiple().
*/
function
deleteMultiple
(
array
$cids
)
{
try
{
...
...
@@ -77,7 +77,7 @@ function deleteMultiple(array $cids) {
}
/**
* Implements Drupal\C
ache\DatabaseBackend
::deletePrefix().
* Implements Drupal\C
ore\Cache\CacheBackendInterface
::deletePrefix().
*/
function
deletePrefix
(
$prefix
)
{
try
{
...
...
@@ -89,7 +89,7 @@ function deletePrefix($prefix) {
}
/**
* Implements Drupal\C
ache\DatabaseBackend
::flush().
* Implements Drupal\C
ore\Cache\CacheBackendInterface
::flush().
*/
function
flush
()
{
try
{
...
...
@@ -101,7 +101,7 @@ function flush() {
}
/**
* Overrides Drupal\C
ache\DatabaseBackend
::isEmpty().
* Overrides Drupal\C
ore\Cache\CacheBackendInterface
::isEmpty().
*/
function
isEmpty
()
{
return
TRUE
;
...
...
core/lib/Drupal/Core/Cache/NullBackend.php
View file @
8b8c2a94
...
...
@@ -21,61 +21,61 @@
class
NullBackend
implements
CacheBackendInterface
{
/**
* Implements Drupal\Cache\CacheBackendInterface::__construct().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::__construct().
*/
function
__construct
(
$bin
)
{}
/**
* Implements Drupal\Cache\CacheBackendInterface::get().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::get().
*/
function
get
(
$cid
)
{
return
FALSE
;
}
/**
* Implements Drupal\Cache\CacheBackendInterface::getMultiple().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::getMultiple().
*/
function
getMultiple
(
&
$cids
)
{
return
array
();
}
/**
* Implements Drupal\Cache\CacheBackendInterface::set().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::set().
*/
function
set
(
$cid
,
$data
,
$expire
=
CACHE_PERMANENT
)
{}
/**
* Implements Drupal\Cache\CacheBackendInterface::delete().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::delete().
*/
function
delete
(
$cid
)
{}
/**
* Implements Drupal\Cache\CacheBackendInterface::deleteMultiple().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::deleteMultiple().
*/
function
deleteMultiple
(
array
$cids
)
{}
/**
* Implements Drupal\Cache\CacheBackendInterface::deletePrefix().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::deletePrefix().
*/
function
deletePrefix
(
$prefix
)
{}
/**
* Implements Drupal\Cache\CacheBackendInterface::flush().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::flush().
*/
function
flush
()
{}
/**
* Implements Drupal\Cache\CacheBackendInterface::expire().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::expire().
*/
function
expire
()
{}
/**
* Implements Drupal\Cache\CacheBackendInterface::garbageCollection().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::garbageCollection().
*/
function
garbageCollection
()
{}
/**
* Implements Drupal\Cache\CacheBackendInterface::isEmpty().
* Implements Drupal\
Core\
Cache\CacheBackendInterface::isEmpty().
*/
function
isEmpty
()
{
return
TRUE
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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