Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Drupal\Core\KeyValueStore; /** * Provides a base class for key/value st..
Decoded Output download
<?php
namespace Drupal\Core\KeyValueStore;
/**
* Provides a base class for key/value storage implementations.
*/
abstract class StorageBase implements KeyValueStoreInterface {
/**
* The name of the collection holding key and value pairs.
*
* @var string
*/
protected $collection;
/**
* {@inheritdoc}
*/
public function __construct($collection) {
$this->collection = $collection;
}
/**
* {@inheritdoc}
*/
public function getCollectionName() {
return $this->collection;
}
/**
* {@inheritdoc}
*/
public function get($key, $default = NULL) {
$values = $this->getMultiple([$key]);
return isset($values[$key]) ? $values[$key] : $default;
}
/**
* {@inheritdoc}
*/
public function setMultiple(array $data) {
foreach ($data as $key => $value) {
$this->set($key, $value);
}
}
/**
* {@inheritdoc}
*/
public function delete($key) {
$this->deleteMultiple([$key]);
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Drupal\Core\KeyValueStore;
/**
* Provides a base class for key/value storage implementations.
*/
abstract class StorageBase implements KeyValueStoreInterface {
/**
* The name of the collection holding key and value pairs.
*
* @var string
*/
protected $collection;
/**
* {@inheritdoc}
*/
public function __construct($collection) {
$this->collection = $collection;
}
/**
* {@inheritdoc}
*/
public function getCollectionName() {
return $this->collection;
}
/**
* {@inheritdoc}
*/
public function get($key, $default = NULL) {
$values = $this->getMultiple([$key]);
return isset($values[$key]) ? $values[$key] : $default;
}
/**
* {@inheritdoc}
*/
public function setMultiple(array $data) {
foreach ($data as $key => $value) {
$this->set($key, $value);
}
}
/**
* {@inheritdoc}
*/
public function delete($key) {
$this->deleteMultiple([$key]);
}
}
Function Calls
None |
Stats
MD5 | acbf42828cae9ba87be5b5bc74f2fcab |
Eval Count | 0 |
Decode Time | 74 ms |