Dumplie\Metadata\Infrastructure\InMemory\InMemoryStorage::save PHP Method

save() public method

public save ( string $schema, string $typeName, string $id, array $metadata = [] )
$schema string
$typeName string
$id string
$metadata array
    public function save(string $schema, string $typeName, string $id, array $metadata = [])
    {
        if (!$this->schemaExists($schema)) {
            $this->storage[$schema] = [];
        }
        if (!$this->typeExists($schema, $typeName)) {
            $this->storage[$schema][$typeName] = [];
        }
        $this->storage[$schema][$typeName][$id] = array_merge(['id' => $id], $metadata);
    }