class MockBin in MongoDB 7
Hierarchy
Expanded class hierarchy of MockBin
File
- mongodb_cache/
src/ Tests/ CacheUnitTestCase.php, line 54
Namespace
Drupal\mongodb_cache\TestsView source
class MockBin extends Cache {
// @codingStandardsIgnoreEnd
/**
* Needs to be repeated although it exists on parent class, to avoid warnings.
*
* @var bool
*/
protected static $isExceptionNotified = FALSE;
/**
* MockBin constructor.
*
* @param string $bin
* The name of the mocked bin.
*/
public function __construct($bin) {
// Do not call parent::__construct($bin) to preserve the "mock" aspect.
$this->collection = new MockCollection($bin);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Cache:: |
protected | property | The name of the collection holding the cache data. | |
Cache:: |
protected | property | A closure wrapping MongoBinData::__construct() with its default $type. | |
Cache:: |
protected | property | The collection holding the cache data. | |
Cache:: |
protected | property | The name of the state variable holding the latest bin expire timestamp. | |
Cache:: |
protected | property | The number of seconds during which a new flush will be ignored. | |
Cache:: |
protected | property | The default write options for this collection: unsafe mode. | |
Cache:: |
protected | function | Attempt removing data from the collection, notifying on exceptions. | |
Cache:: |
public | function | ||
Cache:: |
protected | function | An alternate \MongoBinData constructor using default $type. | |
Cache:: |
protected | function | Garbage collection for get() and getMultiple(). | |
Cache:: |
public | function | ||
Cache:: |
protected | function | Return the proper MongoBinData constructor with its type argument. | |
Cache:: |
protected | function | Return the timestamp of the latest flush. | |
Cache:: |
public | function | ||
Cache:: |
public static | function | Has the plugin thrown an exception at any point ? | |
Cache:: |
public | function | ||
Cache:: |
protected static | function | Display an exception error message only once. | |
Cache:: |
protected | function | Prepare a cached item. | |
Cache:: |
public | function | ||
Cache:: |
protected | function | Record a timestamp as marking the latest flush for the current bin. | |
MockBin:: |
protected static | property |
Needs to be repeated although it exists on parent class, to avoid warnings. Overrides Cache:: |
|
MockBin:: |
public | function |
MockBin constructor. Overrides Cache:: |