ElementEntity

Object to hold information on a dependent database element in abstract.

Internal

Table of Contents

Constants

REFERENCES_ChildOf  = 'childOf'
REFERENCES_ParentOf  = 'parentOf'

Properties

$children  : array<string|int, mixed>|null
$data  : array<string|int, mixed>
$dependency  : DependencyResolver
$id  : int
$invalid  : bool
$nestedChildren  : array<string|int, mixed>|null
$outerMostParent  : ElementEntity|false|null
$parents  : array<string|int, mixed>|null
$record  : array<string|int, mixed>
$table  : string

Methods

__construct()  : mixed
__toString()  : string
getChildren()  : array<string|int, ReferenceEntity>
Gets all child references.
getData()  : array<string|int, mixed>
getDataValue()  : mixed
getDependency()  : DependencyResolver
getId()  : int
getNestedChildren()  : array<string|int, ReferenceEntity>
Gets nested children accumulated.
getOuterMostParent()  : false|ElementEntity
Gets the outermost parent element.
getParents()  : array<string|int, ReferenceEntity>
Gets all parent references.
getRecord()  : array<string|int, mixed>
Gets the database record of this element.
getTable()  : string
hasDataValue()  : bool
hasReferences()  : bool
Determines whether there are child or parent references.
isInvalid()  : bool
setDataValue()  : void
setId()  : void
setInvalid()  : void

Constants

REFERENCES_ChildOf

public mixed REFERENCES_ChildOf = 'childOf'

REFERENCES_ParentOf

public mixed REFERENCES_ParentOf = 'parentOf'

Properties

$children

protected array<string|int, mixed>|null $children

$data

protected array<string|int, mixed> $data

$nestedChildren

protected array<string|int, mixed>|null $nestedChildren

$parents

protected array<string|int, mixed>|null $parents

$record

protected array<string|int, mixed> $record

Methods

__construct()

public __construct(string $table, int $id, array<string|int, mixed> $data, DependencyResolver $dependency) : mixed
Parameters
$table : string
$id : int
$data : array<string|int, mixed>
$dependency : DependencyResolver

__toString()

public __toString() : string
Return values
string

getData()

public getData() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDataValue()

public getDataValue(string $key) : mixed
Parameters
$key : string

getId()

public getId() : int
Return values
int

getRecord()

Gets the database record of this element.

public getRecord() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTable()

public getTable() : string
Return values
string

hasDataValue()

public hasDataValue(string $key) : bool
Parameters
$key : string
Return values
bool

hasReferences()

Determines whether there are child or parent references.

public hasReferences() : bool
Return values
bool

isInvalid()

public isInvalid() : bool
Return values
bool

setDataValue()

public setDataValue(string $key, mixed $value) : void
Parameters
$key : string
$value : mixed

setId()

public setId(int $id) : void
Parameters
$id : int

setInvalid()

public setInvalid(bool $invalid) : void
Parameters
$invalid : bool

        
On this page

Search results