PHP Класс Spot\Entity\Manager

Автор: Vance Lucas ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$entityName string | Spot\Entity
$fieldAliasMappings array
$fieldDefaultValues array
$fields array
$fieldsDefined array
$mapper
$primaryKeyField
$relations array
$scopes array
$table
$tableOptions

Открытые методы

Метод Описание
__construct ( string | Entity $entityName ) Entity to get information for
fieldAliasMappings ( ) : array Field alias mappings (used for lookup)
fieldDefaultValues ( ) : array Get field default values as defined in class field definitions
fieldExists ( string $field ) : boolean Check if field exists in defined fields
fieldKeys ( ) : array Groups field keys into names arrays of fields with key name as index
fieldType ( string $field ) : mixed Return field type
fields ( ) : array Get formatted fields with all necessary array keys and values.
fieldsDefined ( ) : array Get field information exactly how it is defined in the class
mapper ( ) : string Get name of custom mapper for given entity class
primaryKeyField ( ) Get value of primary key for given row result
relations ( ) Get defined relations
resetFields ( )
table ( ) : string Get name of table for given entity class
tableOptions ( ) : string Get table options for given entity class

Приватные методы

Метод Описание
computeIndexName ( string $table, string | boolean $indexConfiguration ) : string | boolean Attempt to generate a user-suffixed index name

Описание методов

__construct() публичный Метод

Entity to get information for
public __construct ( string | Entity $entityName )
$entityName string | Spot\Entity

fieldAliasMappings() публичный Метод

Field alias mappings (used for lookup)
public fieldAliasMappings ( ) : array
Результат array Field alias => actual column name

fieldDefaultValues() публичный Метод

Get field default values as defined in class field definitions
public fieldDefaultValues ( ) : array
Результат array Array of field key => value pairs

fieldExists() публичный Метод

Check if field exists in defined fields
public fieldExists ( string $field ) : boolean
$field string Field name to check for existence
Результат boolean

fieldKeys() публичный Метод

Groups field keys into names arrays of fields with key name as index
public fieldKeys ( ) : array
Результат array Key-named associative array of field names in that index

fieldType() публичный Метод

Return field type
public fieldType ( string $field ) : mixed
$field string Field name
Результат mixed Field type string or boolean false

fields() публичный Метод

Merges defaults with defined field values to ensure all options exist for each field.
public fields ( ) : array
Результат array Defined fields plus all defaults for full array of all possible options

fieldsDefined() публичный Метод

Get field information exactly how it is defined in the class
public fieldsDefined ( ) : array
Результат array Array of field key => value pairs

mapper() публичный Метод

Get name of custom mapper for given entity class
public mapper ( ) : string
Результат string

primaryKeyField() публичный Метод

Get value of primary key for given row result
public primaryKeyField ( )

relations() публичный Метод

Get defined relations
public relations ( )

resetFields() публичный Метод

public resetFields ( )

table() публичный Метод

Get name of table for given entity class
public table ( ) : string
Результат string

tableOptions() публичный Метод

Get table options for given entity class
public tableOptions ( ) : string
Результат string

Описание свойств

$entityName защищенное свойство

protected string|Entity,Spot $entityName
Результат string | Spot\Entity

$fieldAliasMappings защищенное свойство

protected array $fieldAliasMappings
Результат array

$fieldDefaultValues защищенное свойство

protected array $fieldDefaultValues
Результат array

$fields защищенное свойство

protected array $fields
Результат array

$fieldsDefined защищенное свойство

protected array $fieldsDefined
Результат array

$mapper защищенное свойство

protected $mapper

$primaryKeyField защищенное свойство

protected $primaryKeyField

$relations защищенное свойство

protected array $relations
Результат array

$scopes защищенное свойство

protected array $scopes
Результат array

$table защищенное свойство

protected $table

$tableOptions защищенное свойство

protected $tableOptions