PHP Class Nextras\Orm\Mapper\Dbal\DbalMapper

Inheritance: extends Nextras\Orm\Mapper\BaseMapper
ファイルを表示 Open project: nextras/orm Class Usage Examples

Protected Properties

Property Type Description
$cache Nette\Caching\Cache
$connection Nextras\Dbal\Connection

Public Methods

Method Description
__construct ( Nextras\Dbal\Connection $connection, Cache $cache )
beginTransaction ( ) == Transactions API =============================================================================================
builder ( ) : Nextras\Dbal\QueryBuilder\QueryBuilder
createCollectionManyHasMany ( Nextras\Orm\Mapper\IMapper $mapperTwo, PropertyMetadata $metadata, Nextras\Orm\Entity\IEntity $parent )
createCollectionManyHasOne ( PropertyMetadata $metadata, Nextras\Orm\Entity\IEntity $parent ) == Relationship mappers =========================================================================================
createCollectionOneHasMany ( PropertyMetadata $metadata, Nextras\Orm\Entity\IEntity $parent )
createCollectionOneHasOne ( PropertyMetadata $metadata, Nextras\Orm\Entity\IEntity $parent )
findAll ( )
flush ( )
getAutoupdateReselectExpression ( )
getManyHasManyParameters ( PropertyMetadata $sourceProperty, Nextras\Orm\Mapper\IMapper $targetMapper )
getStorageReflection ( ) : Nextras\Orm\Mapper\Dbal\StorageReflection\IStorageReflection
persist ( Nextras\Orm\Entity\IEntity $entity ) == Persistence API ==============================================================================================
remove ( Nextras\Orm\Entity\IEntity $entity )
rollback ( )
toCollection ( $data )

Protected Methods

Method Description
createRelationshipMapper ( $type, PropertyMetadata $metadata, Nextras\Orm\Mapper\IMapper $otherMapper = null )
createStorageReflection ( )
entityToArray ( Nextras\Orm\Entity\IEntity $entity )
getRelationshipMapper ( $type, PropertyMetadata $metadata, Nextras\Orm\Mapper\IMapper $otherMapper = null )
processAutoupdate ( Nextras\Orm\Entity\IEntity $entity, array $args )
processInsert ( Nextras\Orm\Entity\IEntity $entity, $data )
processMySQLAutoupdate ( Nextras\Orm\Entity\IEntity $entity, array $args )
processPostgreAutoupdate ( Nextras\Orm\Entity\IEntity $entity, array $args )
processRemove ( Nextras\Orm\Entity\IEntity $entity, $primary )
processUpdate ( Nextras\Orm\Entity\IEntity $entity, $data, $primary )

Method Details

__construct() public method

public __construct ( Nextras\Dbal\Connection $connection, Cache $cache )
$connection Nextras\Dbal\Connection
$cache Nette\Caching\Cache

beginTransaction() public method

== Transactions API =============================================================================================
public beginTransaction ( )

builder() public method

public builder ( ) : Nextras\Dbal\QueryBuilder\QueryBuilder
return Nextras\Dbal\QueryBuilder\QueryBuilder

createCollectionManyHasMany() public method

public createCollectionManyHasMany ( Nextras\Orm\Mapper\IMapper $mapperTwo, PropertyMetadata $metadata, Nextras\Orm\Entity\IEntity $parent )
$mapperTwo Nextras\Orm\Mapper\IMapper
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata
$parent Nextras\Orm\Entity\IEntity

createCollectionManyHasOne() public method

== Relationship mappers =========================================================================================
public createCollectionManyHasOne ( PropertyMetadata $metadata, Nextras\Orm\Entity\IEntity $parent )
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata
$parent Nextras\Orm\Entity\IEntity

createCollectionOneHasMany() public method

public createCollectionOneHasMany ( PropertyMetadata $metadata, Nextras\Orm\Entity\IEntity $parent )
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata
$parent Nextras\Orm\Entity\IEntity

createCollectionOneHasOne() public method

public createCollectionOneHasOne ( PropertyMetadata $metadata, Nextras\Orm\Entity\IEntity $parent )
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata
$parent Nextras\Orm\Entity\IEntity

createRelationshipMapper() protected method

protected createRelationshipMapper ( $type, PropertyMetadata $metadata, Nextras\Orm\Mapper\IMapper $otherMapper = null )
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata
$otherMapper Nextras\Orm\Mapper\IMapper

createStorageReflection() protected method

protected createStorageReflection ( )

entityToArray() protected method

protected entityToArray ( Nextras\Orm\Entity\IEntity $entity )
$entity Nextras\Orm\Entity\IEntity

findAll() public method

public findAll ( )

flush() public method

public flush ( )

getAutoupdateReselectExpression() public method

getManyHasManyParameters() public method

public getManyHasManyParameters ( PropertyMetadata $sourceProperty, Nextras\Orm\Mapper\IMapper $targetMapper )
$sourceProperty Nextras\Orm\Entity\Reflection\PropertyMetadata
$targetMapper Nextras\Orm\Mapper\IMapper

getRelationshipMapper() protected method

protected getRelationshipMapper ( $type, PropertyMetadata $metadata, Nextras\Orm\Mapper\IMapper $otherMapper = null )
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata
$otherMapper Nextras\Orm\Mapper\IMapper

getStorageReflection() public method

public getStorageReflection ( ) : Nextras\Orm\Mapper\Dbal\StorageReflection\IStorageReflection
return Nextras\Orm\Mapper\Dbal\StorageReflection\IStorageReflection

persist() public method

== Persistence API ==============================================================================================
public persist ( Nextras\Orm\Entity\IEntity $entity )
$entity Nextras\Orm\Entity\IEntity

processAutoupdate() protected method

protected processAutoupdate ( Nextras\Orm\Entity\IEntity $entity, array $args )
$entity Nextras\Orm\Entity\IEntity
$args array

processInsert() protected method

protected processInsert ( Nextras\Orm\Entity\IEntity $entity, $data )
$entity Nextras\Orm\Entity\IEntity

processMySQLAutoupdate() protected method

protected processMySQLAutoupdate ( Nextras\Orm\Entity\IEntity $entity, array $args )
$entity Nextras\Orm\Entity\IEntity
$args array

processPostgreAutoupdate() protected method

protected processPostgreAutoupdate ( Nextras\Orm\Entity\IEntity $entity, array $args )
$entity Nextras\Orm\Entity\IEntity
$args array

processRemove() protected method

protected processRemove ( Nextras\Orm\Entity\IEntity $entity, $primary )
$entity Nextras\Orm\Entity\IEntity

processUpdate() protected method

protected processUpdate ( Nextras\Orm\Entity\IEntity $entity, $data, $primary )
$entity Nextras\Orm\Entity\IEntity

remove() public method

public remove ( Nextras\Orm\Entity\IEntity $entity )
$entity Nextras\Orm\Entity\IEntity

rollback() public method

public rollback ( )

toCollection() public method

public toCollection ( $data )

Property Details

$cache protected_oe property

protected Cache,Nette\Caching $cache
return Nette\Caching\Cache

$connection protected_oe property

protected Connection,Nextras\Dbal $connection
return Nextras\Dbal\Connection