프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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 |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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 |
메소드 | 설명 | |
---|---|---|
__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). |
메소드 | 설명 | |
---|---|---|
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 |
리턴 | array | Columns acceptable for the entity's attributes |
public getAdditionalSelectValues ( ) : array | ||
리턴 | array |
public getRequiredAttributes ( mixed $row ) : array | ||
$row | mixed | a row loaded from DB (array or \stdClass) or a GUID |
리턴 | 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 |
리턴 | array |
protected isMissingSecondaries ( stdClass $row ) : array | ||
$row | stdClass | Database row |
리턴 | array |
protected $additional_select_values |
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 |