PHP Class Bravo3\Orm\KeySchemes\StandardKeyScheme

Inheritance: implements Bravo3\Orm\KeySchemes\KeySchemeInterface
Mostrar archivo Open project: bravo3/orm

Protected Properties

Property Type Description
$delimiter string

Public Methods

Method Description
__construct ( $delimiter = null )
getDelimiter ( ) : string Get the section delimiter
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
setDelimiter ( string $delimiter ) Set the section delimiter

Method Details

__construct() public method

public __construct ( $delimiter = null )

getDelimiter() public method

Get the section delimiter
public getDelimiter ( ) : string
return string

getEntityKey() public method

Return the key for an entity document
public getEntityKey ( string $table_name, string $id ) : string
$table_name string Table name
$id string Entity ID
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

setDelimiter() public method

Set the section delimiter
public setDelimiter ( string $delimiter )
$delimiter string

Property Details

$delimiter protected_oe property

protected string $delimiter
return string