PHP Interface Bravo3\Orm\KeySchemes\KeySchemeInterface

Datei anzeigen Open project: bravo3/orm Interface Usage Examples

Public Methods

Method Description
getEntityKey ( string $table_name, string $id ) : string Return the key for an entity document
getEntityRefKey ( string $table_name, string $id ) : string Return the key for an entity ref table
getIndexKey ( Bravo3\Orm\Mappers\Metadata\Index $index, string $key ) : string Get the key for an standard index
getRelationshipKey ( Relationship $relationship, string $source_table, string $target_table, string $id ) : string Get the key for a foreign relationship
getSortIndexKey ( Relationship $relationship, string $source_table, string $target_table, string $sort_field, string $id ) : string Get the key for a sort index on a relationship
getTableSortKey ( string $table_name, string $sort_field ) : string Get the key for a sort index on a table

Method Details

getEntityKey() public method

Return the key for an entity document
public getEntityKey ( string $table_name, string $id ) : string
$table_name string
$id string
return string

getEntityRefKey() public method

Return the key for an entity ref table
public getEntityRefKey ( string $table_name, string $id ) : string
$table_name string Table name
$id string Entity ID
return string

getIndexKey() public method

Get the key for an standard index
public getIndexKey ( Bravo3\Orm\Mappers\Metadata\Index $index, string $key ) : string
$index Bravo3\Orm\Mappers\Metadata\Index Index belonging to entity
$key string Index key
return string

getRelationshipKey() public method

Get the key for a foreign relationship
public getRelationshipKey ( Relationship $relationship, string $source_table, string $target_table, string $id ) : string
$relationship Bravo3\Orm\Mappers\Metadata\Relationship Relationship
$source_table string Source table name
$target_table string Target table name
$id string Source entity ID
return string

getSortIndexKey() public method

Get the key for a sort index on a relationship
public getSortIndexKey ( Relationship $relationship, string $source_table, string $target_table, string $sort_field, string $id ) : string
$relationship Bravo3\Orm\Mappers\Metadata\Relationship Relationship
$source_table string Source table name
$target_table string Target table name
$sort_field string Property name on the inverse entity
$id string Local ID
return string

getTableSortKey() public method

Get the key for a sort index on a table
public getTableSortKey ( string $table_name, string $sort_field ) : string
$table_name string Name of table containing sorted entity list
$sort_field string Sortable field on the table
return string