Final Class Yiisoft\Yii\Debug\Storage\MemoryStorage
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Yiisoft\ |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| clear() | Yiisoft\ |
|
| read() | Yiisoft\ |
|
| write() | Yiisoft\ |
Method Details
| public array read ( string $type, ?string $id = null ) | ||
| $type | string | |
| $id | ?string | |
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,
];
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.