Свойство | Type | Description | |
---|---|---|---|
$full_loader | function used to load all necessary attributes | ||
$primary_loader | function used to load attributes from {prefix}entities table | ||
$requires_access_control | should access control be considered when fetching entity? | ||
$secondary_loader | function used to load attributes from secondary table |
Свойство | Type | Description | |
---|---|---|---|
$additional_select_values | retrieved values that are not attributes | ||
$class | class of object being loaded | ||
$initialized_attributes | array | ||
$integer_attr_names | names of attributes in all entities that should be stored as integer values | ||
$null_attr_names | names of attributes in all entities that should be stored as null if empty | ||
$primary_attr_names | names of attributes in all entities | ||
$required_type | entity type (not class) required for fetched primaries | ||
$secondary_attr_names | names of secondary attributes required for the entity |
Méthode | Description | |
---|---|---|
__construct ( string $class, string $required_type, array $initialized_attrs ) | Constructor | |
getAdditionalSelectValues ( ) : array | Get values selected from the database that are not attributes | |
getRequiredAttributes ( mixed $row ) : array | Get all required attributes for the entity, validating any that are passed in. Returns empty array if can't be loaded (Check $failure_reason). |
Méthode | Description | |
---|---|---|
checkType ( stdClass $row ) : void | Check that the type is correct | |
filterAddedColumns ( array $row ) : array | Filter non-attribute keys into $this->additional_select_values | |
isMissingPrimaries ( stdClass $row ) : array | Get primary attributes missing that are missing | |
isMissingSecondaries ( stdClass $row ) : array | Get secondary attributes that are missing |
protected filterAddedColumns ( array $row ) : array | ||
$row | array | All columns from the query |
Résultat | array | Columns acceptable for the entity's attributes |
public getAdditionalSelectValues ( ) : array | ||
Résultat | array |
public getRequiredAttributes ( mixed $row ) : array | ||
$row | mixed | a row loaded from DB (array or \stdClass) or a GUID |
Résultat | array | will be empty if failed to load all attributes (access control or entity doesn't exist) |
protected isMissingPrimaries ( stdClass $row ) : array | ||
$row | stdClass | Database row |
Résultat | array |
protected isMissingSecondaries ( stdClass $row ) : array | ||
$row | stdClass | Database row |
Résultat | array |
protected $additional_select_values |
protected array $initialized_attributes | ||
Résultat | array |
protected static $integer_attr_names |
protected static $null_attr_names |
protected static $primary_attr_names |
public $primary_loader |
protected $required_type |
public $requires_access_control |
protected $secondary_attr_names |