Final Class Yiisoft\Yii\Debug\Storage\MemoryStorage
| Inheritance | Yiisoft\Yii\Debug\Storage\MemoryStorage |
|---|---|
| Implements | Yiisoft\Yii\Debug\Storage\StorageInterface |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| clear() | Yiisoft\Yii\Debug\Storage\MemoryStorage | |
| read() | Yiisoft\Yii\Debug\Storage\MemoryStorage | |
| write() | Yiisoft\Yii\Debug\Storage\MemoryStorage |
Constants
| Constant | Value | Description | Defined By |
|---|---|---|---|
| TYPE_DATA | 'data' | Yiisoft\Yii\Debug\Storage\StorageInterface | |
| TYPE_OBJECTS | 'objects' | Yiisoft\Yii\Debug\Storage\StorageInterface | |
| TYPE_SUMMARY | 'summary' | Yiisoft\Yii\Debug\Storage\StorageInterface |
Method Details
| public array read ( string $type, string|null $id = null ) | ||
| $type | string | |
| $id | string|null | |
public function read(string $type, ?string $id = null): array
{
if ($id === null) {
return array_map(
static fn (array $item): array => $item[$type] ?? [],
$this->storage,
);
}
return [$id => $this->storage[$id][$type] ?? []];
}
| public void write ( string $id, array $data, array $objectsMap, array $summary ) | ||
| $id | string | |
| $data | array | |
| $objectsMap | array | |
| $summary | array | |
public function write(string $id, array $data, array $objectsMap, array $summary): void
{
$this->storage[$id] = [
'data' => $data,
'objects' => $objectsMap,
'summary' => $summary,
];
}
Signup or Login in order to comment.