PhpStorageFactory

Creates a php storage object Hierarchy class \Drupal\Core\PhpStorage\PhpStorageFactory File core/lib/Drupal/Core/PhpStorage/PhpStorageFactory.php, line 11 Namespace Drupal\Core\PhpStorage Members Name Modifiers Type Description PhpStorageFactory::get static function Instantiates a storage for generated PHP code.

PhpSerialize::getFileExtension

public static PhpSerialize::getFileExtension() Gets the file extension for this serialization format. Return value string The file extension, without leading dot. Overrides SerializationInterface::getFileExtension File core/lib/Drupal/Component/Serialization/PhpSerialize.php, line 27 Class PhpSerialize Default serialization for serialized PHP. Namespace Drupal\Component\Serialization Code public static function getFileExtension() { return 'serialized'; }

PhpSerialize::encode

public static PhpSerialize::encode($data) Encodes data into the serialization format. Parameters mixed $data: The data to encode. Return value string The encoded data. Overrides SerializationInterface::encode File core/lib/Drupal/Component/Serialization/PhpSerialize.php, line 13 Class PhpSerialize Default serialization for serialized PHP. Namespace Drupal\Component\Serialization Code public static function encode($data) { return serialize($data); }

PhpSerialize::decode

public static PhpSerialize::decode($raw) Decodes data from the serialization format. Parameters string $raw: The raw data string to decode. Return value mixed The decoded data. Overrides SerializationInterface::decode File core/lib/Drupal/Component/Serialization/PhpSerialize.php, line 20 Class PhpSerialize Default serialization for serialized PHP. Namespace Drupal\Component\Serialization Code public static function decode($raw) { return unserialize($raw); }

PhpSerialize

Default serialization for serialized PHP. Hierarchy class \Drupal\Component\Serialization\PhpSerialize implements SerializationInterface File core/lib/Drupal/Component/Serialization/PhpSerialize.php, line 8 Namespace Drupal\Component\Serialization Members Name Modifiers Type Description PhpSerialize::decode public static function Decodes data from the serialization format. Overrides SerializationInterface::decode PhpSerialize::encode public static function Encode

PhpBackend::__construct

public PhpBackend::__construct($bin, CacheTagsChecksumInterface $checksum_provider) Constructs a PhpBackend object. Parameters string $bin: The cache bin for which the object is created. \Drupal\Core\Cache\CacheTagsChecksumInterface $checksum_provider: The cache tags checksum provider. File core/lib/Drupal/Core/Cache/PhpBackend.php, line 48 Class PhpBackend Defines a PHP cache implementation. Namespace Drupal\Core\Cache Code public function __construct($bin, CacheTagsChecksumInterface

PhpBackend::writeItem

protected PhpBackend::writeItem($cidhash, \stdClass $item) Writes a cache item to PhpStorage. Parameters string $cidhash: The hashed version of the original cache ID after being normalized. \stdClass $item: The cache item to store. File core/lib/Drupal/Core/Cache/PhpBackend.php, line 241 Class PhpBackend Defines a PHP cache implementation. Namespace Drupal\Core\Cache Code protected function writeItem($cidhash, \stdClass $item) { $content = '<?php return unserialize(' . var_export

PhpBackend::storage

protected PhpBackend::storage() Gets the PHP code storage object to use. Return value \Drupal\Component\PhpStorage\PhpStorageInterface File core/lib/Drupal/Core/Cache/PhpBackend.php, line 251 Class PhpBackend Defines a PHP cache implementation. Namespace Drupal\Core\Cache Code protected function storage() { if (!isset($this->storage)) { $this->storage = PhpStorageFactory::get($this->bin); } return $this->storage; }

PhpBackend::setMultiple

public PhpBackend::setMultiple(array $items) Store multiple items in the persistent cache. Parameters array $items: An array of cache items, keyed by cid. In the form: $items = array( $cid => array( // Required, will be automatically serialized if not a string. 'data' => $data, // Optional, defaults to CacheBackendInterface::CACHE_PERMANENT. 'expire' => CacheBackendInterface::CACHE_PERMANENT, // (optional) The cache tags for this item, see CacheBack

PhpBackend::set

public PhpBackend::set($cid, $data, $expire = Cache::PERMANENT, array $tags = array()) Stores data in the persistent cache. Core cache implementations set the created time on cache item with microtime(TRUE) rather than REQUEST_TIME_FLOAT, because the created time of cache items should match when they are created, not when the request started. Apart from being more accurate, this increases the chance an item will legitimately be considered valid. Parameters string $cid: The cache ID of the data