Merge branch '1400748-namespaces' into dbtngtng

8.0.x
Larry Garfield 2012-01-22 22:31:43 -06:00
commit 86c93f3b74
5 changed files with 33 additions and 33 deletions

View File

@ -8,10 +8,10 @@
/** /**
* Instantiates and statically caches the correct class for a cache bin. * 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. * 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. * both as a default implementation and for specific bins.
* *
* @param $bin * @param $bin

View File

@ -285,7 +285,7 @@ function install_begin_request(&$install_state) {
// because any data put in the cache during the installer is inherently // 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. // suspect, due to the fact that Drupal is not fully set up yet.
require_once DRUPAL_ROOT . '/core/includes/cache.inc'; 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 // 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 // page request to avoid a different theme accidentally getting set. (We also

View File

@ -23,7 +23,7 @@ class DatabaseBackend implements CacheBackendInterface {
protected $bin; protected $bin;
/** /**
* Implements Drupal\Cache\CacheBackendInterface::__construct(). * Implements Drupal\Core\Cache\CacheBackendInterface::__construct().
*/ */
function __construct($bin) { function __construct($bin) {
// All cache tables should be prefixed with 'cache_', except for the // All cache tables should be prefixed with 'cache_', except for the
@ -35,7 +35,7 @@ class DatabaseBackend implements CacheBackendInterface {
} }
/** /**
* Implements Drupal\Cache\CacheBackendInterface::get(). * Implements Drupal\Core\Cache\CacheBackendInterface::get().
*/ */
function get($cid) { function get($cid) {
$cids = array($cid); $cids = array($cid);
@ -44,7 +44,7 @@ class DatabaseBackend implements CacheBackendInterface {
} }
/** /**
* Implements Drupal\Cache\CacheBackendInterface::getMultiple(). * Implements Drupal\Core\Cache\CacheBackendInterface::getMultiple().
*/ */
function getMultiple(&$cids) { function getMultiple(&$cids) {
try { try {
@ -114,7 +114,7 @@ class DatabaseBackend implements CacheBackendInterface {
} }
/** /**
* Implements Drupal\Cache\CacheBackendInterface::set(). * Implements Drupal\Core\Cache\CacheBackendInterface::set().
*/ */
function set($cid, $data, $expire = CACHE_PERMANENT) { function set($cid, $data, $expire = CACHE_PERMANENT) {
$fields = array( $fields = array(
@ -143,7 +143,7 @@ class DatabaseBackend implements CacheBackendInterface {
} }
/** /**
* Implements Drupal\Cache\CacheBackendInterface::delete(). * Implements Drupal\Core\Cache\CacheBackendInterface::delete().
*/ */
function delete($cid) { function delete($cid) {
db_delete($this->bin) db_delete($this->bin)
@ -152,7 +152,7 @@ class DatabaseBackend implements CacheBackendInterface {
} }
/** /**
* Implements Drupal\Cache\CacheBackendInterface::deleteMultiple(). * Implements Drupal\Core\Cache\CacheBackendInterface::deleteMultiple().
*/ */
function deleteMultiple(Array $cids) { function deleteMultiple(Array $cids) {
// Delete in chunks when a large array is passed. // Delete in chunks when a large array is passed.
@ -165,7 +165,7 @@ class DatabaseBackend implements CacheBackendInterface {
} }
/** /**
* Implements Drupal\Cache\CacheBackendInterface::deletePrefix(). * Implements Drupal\Core\Cache\CacheBackendInterface::deletePrefix().
*/ */
function deletePrefix($prefix) { function deletePrefix($prefix) {
db_delete($this->bin) db_delete($this->bin)
@ -174,14 +174,14 @@ class DatabaseBackend implements CacheBackendInterface {
} }
/** /**
* Implements Drupal\Cache\CacheBackendInterface::flush(). * Implements Drupal\Core\Cache\CacheBackendInterface::flush().
*/ */
function flush() { function flush() {
db_truncate($this->bin)->execute(); db_truncate($this->bin)->execute();
} }
/** /**
* Implements Drupal\Cache\CacheBackendInterface::expire(). * Implements Drupal\Core\Cache\CacheBackendInterface::expire().
*/ */
function expire() { function expire() {
if (variable_get('cache_lifetime', 0)) { if (variable_get('cache_lifetime', 0)) {
@ -216,7 +216,7 @@ class DatabaseBackend implements CacheBackendInterface {
} }
/** /**
* Implements Drupal\Cache\CacheBackendInterface::garbageCollection(). * Implements Drupal\Core\Cache\CacheBackendInterface::garbageCollection().
*/ */
function garbageCollection() { function garbageCollection() {
global $user; global $user;
@ -236,7 +236,7 @@ class DatabaseBackend implements CacheBackendInterface {
} }
/** /**
* Implements Drupal\Cache\CacheBackendInterface::isEmpty(). * Implements Drupal\Core\Cache\CacheBackendInterface::isEmpty().
*/ */
function isEmpty() { function isEmpty() {
$this->garbageCollection(); $this->garbageCollection();

View File

@ -34,26 +34,26 @@ use Exception;
class InstallBackend extends DatabaseBackend { class InstallBackend extends DatabaseBackend {
/** /**
* Overrides Drupal\Cache\DatabaseBackend::get(). * Overrides Drupal\Core\Cache\CacheBackendInterface::get().
*/ */
function get($cid) { function get($cid) {
return FALSE; return FALSE;
} }
/** /**
* Overrides Drupal\Cache\DatabaseBackend::getMultiple(). * Overrides Drupal\Core\Cache\CacheBackendInterface::getMultiple().
*/ */
function getMultiple(&$cids) { function getMultiple(&$cids) {
return array(); return array();
} }
/** /**
* Overrides Drupal\Cache\DatabaseBackend::set(). * Overrides Drupal\Core\Cache\CacheBackendInterface::set().
*/ */
function set($cid, $data, $expire = CACHE_PERMANENT) {} function set($cid, $data, $expire = CACHE_PERMANENT) {}
/** /**
* Implements Drupal\Cache\DatabaseBackend::delete(). * Implements Drupal\Core\Cache\CacheBackendInterface::delete().
*/ */
function delete($cid) { function delete($cid) {
try { try {
@ -65,7 +65,7 @@ class InstallBackend extends DatabaseBackend {
} }
/** /**
* Implements Drupal\Cache\DatabaseBackend::deleteMultiple(). * Implements Drupal\Core\Cache\CacheBackendInterface::deleteMultiple().
*/ */
function deleteMultiple(array $cids) { function deleteMultiple(array $cids) {
try { try {
@ -77,7 +77,7 @@ class InstallBackend extends DatabaseBackend {
} }
/** /**
* Implements Drupal\Cache\DatabaseBackend::deletePrefix(). * Implements Drupal\Core\Cache\CacheBackendInterface::deletePrefix().
*/ */
function deletePrefix($prefix) { function deletePrefix($prefix) {
try { try {
@ -89,7 +89,7 @@ class InstallBackend extends DatabaseBackend {
} }
/** /**
* Implements Drupal\Cache\DatabaseBackend::flush(). * Implements Drupal\Core\Cache\CacheBackendInterface::flush().
*/ */
function flush() { function flush() {
try { try {
@ -101,7 +101,7 @@ class InstallBackend extends DatabaseBackend {
} }
/** /**
* Overrides Drupal\Cache\DatabaseBackend::isEmpty(). * Overrides Drupal\Core\Cache\CacheBackendInterface::isEmpty().
*/ */
function isEmpty() { function isEmpty() {
return TRUE; return TRUE;

View File

@ -21,61 +21,61 @@ namespace Drupal\Core\Cache;
class NullBackend implements CacheBackendInterface { class NullBackend implements CacheBackendInterface {
/** /**
* Implements Drupal\Cache\CacheBackendInterface::__construct(). * Implements Drupal\Core\Cache\CacheBackendInterface::__construct().
*/ */
function __construct($bin) {} function __construct($bin) {}
/** /**
* Implements Drupal\Cache\CacheBackendInterface::get(). * Implements Drupal\Core\Cache\CacheBackendInterface::get().
*/ */
function get($cid) { function get($cid) {
return FALSE; return FALSE;
} }
/** /**
* Implements Drupal\Cache\CacheBackendInterface::getMultiple(). * Implements Drupal\Core\Cache\CacheBackendInterface::getMultiple().
*/ */
function getMultiple(&$cids) { function getMultiple(&$cids) {
return array(); return array();
} }
/** /**
* Implements Drupal\Cache\CacheBackendInterface::set(). * Implements Drupal\Core\Cache\CacheBackendInterface::set().
*/ */
function set($cid, $data, $expire = CACHE_PERMANENT) {} function set($cid, $data, $expire = CACHE_PERMANENT) {}
/** /**
* Implements Drupal\Cache\CacheBackendInterface::delete(). * Implements Drupal\Core\Cache\CacheBackendInterface::delete().
*/ */
function delete($cid) {} function delete($cid) {}
/** /**
* Implements Drupal\Cache\CacheBackendInterface::deleteMultiple(). * Implements Drupal\Core\Cache\CacheBackendInterface::deleteMultiple().
*/ */
function deleteMultiple(array $cids) {} function deleteMultiple(array $cids) {}
/** /**
* Implements Drupal\Cache\CacheBackendInterface::deletePrefix(). * Implements Drupal\Core\Cache\CacheBackendInterface::deletePrefix().
*/ */
function deletePrefix($prefix) {} function deletePrefix($prefix) {}
/** /**
* Implements Drupal\Cache\CacheBackendInterface::flush(). * Implements Drupal\Core\Cache\CacheBackendInterface::flush().
*/ */
function flush() {} function flush() {}
/** /**
* Implements Drupal\Cache\CacheBackendInterface::expire(). * Implements Drupal\Core\Cache\CacheBackendInterface::expire().
*/ */
function expire() {} function expire() {}
/** /**
* Implements Drupal\Cache\CacheBackendInterface::garbageCollection(). * Implements Drupal\Core\Cache\CacheBackendInterface::garbageCollection().
*/ */
function garbageCollection() {} function garbageCollection() {}
/** /**
* Implements Drupal\Cache\CacheBackendInterface::isEmpty(). * Implements Drupal\Core\Cache\CacheBackendInterface::isEmpty().
*/ */
function isEmpty() { function isEmpty() {
return TRUE; return TRUE;