PHP Class Nextras\Orm\Mapper\Dbal\StorageReflection\StorageReflection

Inheritance: extends Nette\Object, implements Nextras\Orm\Mapper\Dbal\StorageReflection\IStorageReflection
Show file Open project: nextras/orm Class Usage Examples

Public Properties

Property Type Description
$manyHasManyStorageNamePattern string

Protected Properties

Property Type Description
$entityPrimaryKey array
$mappings array
$modifiers array
$platform Nextras\Dbal\Platforms\IPlatform
$storageName string
$storagePrimaryKey array

Public Methods

Method Description
__construct ( Nextras\Dbal\Connection $connection, $storageName, array $entityPrimaryKey, Cache $cache )
addMapping ( string $entity, string $storage, callable $toEntityCb = null, callable $toStorageCb = null ) : StorageReflection Adds mapping.
addModifier ( string $storageKey, string $saveModifier ) : StorageReflection Adds parameter modifier for data-trasform to Nextras Dbal layer.
convertEntityToStorage ( $in )
convertEntityToStorageKey ( $key )
convertStorageToEntity ( $in )
convertStorageToEntityKey ( $key )
getManyHasManyStorageName ( Nextras\Orm\Mapper\IMapper $target )
getManyHasManyStoragePrimaryKeys ( Nextras\Orm\Mapper\IMapper $target )
getPrimarySequenceName ( )
getStorageName ( )
getStoragePrimaryKey ( )
setMapping ( string $entity, string $storage, callable $toEntityCb = null, callable $toStorageCb = null ) : StorageReflection Sets mapping.

Protected Methods

Method Description
findManyHasManyPrimaryColumns ( $joinTable, $sourceTable, $targetTable )
formatEntityForeignKey ( $key )
formatEntityKey ( $key )
formatStorageKey ( $key )
getDefaultMappings ( )
getDefaultModifiers ( )

Method Details

__construct() public method

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

addMapping() public method

Adds mapping.
public addMapping ( string $entity, string $storage, callable $toEntityCb = null, callable $toStorageCb = null ) : StorageReflection
$entity string
$storage string
$toEntityCb callable
$toStorageCb callable
return StorageReflection

addModifier() public method

Adds parameter modifier for data-trasform to Nextras Dbal layer.
public addModifier ( string $storageKey, string $saveModifier ) : StorageReflection
$storageKey string
$saveModifier string
return StorageReflection

convertEntityToStorage() public method

public convertEntityToStorage ( $in )

convertEntityToStorageKey() public method

public convertEntityToStorageKey ( $key )

convertStorageToEntity() public method

public convertStorageToEntity ( $in )

convertStorageToEntityKey() public method

public convertStorageToEntityKey ( $key )

findManyHasManyPrimaryColumns() protected method

protected findManyHasManyPrimaryColumns ( $joinTable, $sourceTable, $targetTable )

formatEntityForeignKey() abstract protected method

abstract protected formatEntityForeignKey ( $key )

formatEntityKey() abstract protected method

abstract protected formatEntityKey ( $key )

formatStorageKey() abstract protected method

abstract protected formatStorageKey ( $key )

getDefaultMappings() protected method

protected getDefaultMappings ( )

getDefaultModifiers() protected method

protected getDefaultModifiers ( )

getManyHasManyStorageName() public method

public getManyHasManyStorageName ( Nextras\Orm\Mapper\IMapper $target )
$target Nextras\Orm\Mapper\IMapper

getManyHasManyStoragePrimaryKeys() public method

public getManyHasManyStoragePrimaryKeys ( Nextras\Orm\Mapper\IMapper $target )
$target Nextras\Orm\Mapper\IMapper

getPrimarySequenceName() public method

getStorageName() public method

public getStorageName ( )

getStoragePrimaryKey() public method

setMapping() public method

Sets mapping.
public setMapping ( string $entity, string $storage, callable $toEntityCb = null, callable $toStorageCb = null ) : StorageReflection
$entity string
$storage string
$toEntityCb callable
$toStorageCb callable
return StorageReflection

Property Details

$entityPrimaryKey protected property

protected array $entityPrimaryKey
return array

$manyHasManyStorageNamePattern public property

public string $manyHasManyStorageNamePattern
return string

$mappings protected property

protected array $mappings
return array

$modifiers protected property

protected array $modifiers
return array

$platform protected property

protected IPlatform,Nextras\Dbal\Platforms $platform
return Nextras\Dbal\Platforms\IPlatform

$storageName protected property

protected string $storageName
return string

$storagePrimaryKey protected property

protected array $storagePrimaryKey
return array