PHP Class Dumplie\Metadata\Infrastructure\Doctrine\Dbal\DoctrineStorage

Inheritance: implements Dumplie\Metadata\Storage, use trait TableName
Datei anzeigen Open project: dumplie/dumplie Class Usage Examples

Public Methods

Method Description
__construct ( Doctrine\DBAL\Connection $connection, TypeRegistry $typeRegistry ) DoctrineStorage constructor.
alter ( Schema $schema )
create ( Schema $schema )
delete ( string $schema, string $typeName, string $id )
diff ( Schema $schema ) : ChangeSet
drop ( Schema $schema )
findBy ( string $schema, string $typeName, array $criteria = [] ) : array Needs to return metadata in following format: [ 'id' => 'e94e4c36-3ffb-49b6-b8a5-973fa5c4aee6', 'sku' => 'DUMPLIE_SKU_1', 'name' => 'Product name' ] Key 'id' is required.
has ( string $schema, string $typeName, string $id ) : boolean
save ( string $schema, string $typeName, string $id, array $metadata = [] )

Private Methods

Method Description
createTable ( Doctrine\DBAL\Schema\Schema $schema, string $schemaName, TypeSchema $type )
executeQueries ( array $queries )
insert ( string $schema, string $typeName, string $id, array $metadata )
update ( string $schema, string $typeName, string $id, array $metadata )

Method Details

__construct() public method

DoctrineStorage constructor.
public __construct ( Doctrine\DBAL\Connection $connection, TypeRegistry $typeRegistry )
$connection Doctrine\DBAL\Connection
$typeRegistry TypeRegistry

alter() public method

public alter ( Schema $schema )
$schema Dumplie\Metadata\Schema

create() public method

public create ( Schema $schema )
$schema Dumplie\Metadata\Schema

delete() public method

public delete ( string $schema, string $typeName, string $id )
$schema string
$typeName string
$id string

diff() public method

public diff ( Schema $schema ) : ChangeSet
$schema Dumplie\Metadata\Schema
return Dumplie\Metadata\Schema\ChangeSet

drop() public method

public drop ( Schema $schema )
$schema Dumplie\Metadata\Schema

findBy() public method

Needs to return metadata in following format: [ 'id' => 'e94e4c36-3ffb-49b6-b8a5-973fa5c4aee6', 'sku' => 'DUMPLIE_SKU_1', 'name' => 'Product name' ] Key 'id' is required.
public findBy ( string $schema, string $typeName, array $criteria = [] ) : array
$schema string
$typeName string
$criteria array
return array

has() public method

public has ( string $schema, string $typeName, string $id ) : boolean
$schema string
$typeName string
$id string
return boolean

save() public method

public save ( string $schema, string $typeName, string $id, array $metadata = [] )
$schema string
$typeName string
$id string
$metadata array