Aplus Framework Docs

Entity
in package
implements JsonSerializable

Class Entity.

Interfaces, Classes, Traits and Enums

JsonSerializable

Table of Contents

$_jsonOptions  : int
$_jsonVars  : array<string|int, mixed>
$_timezone  : string
__construct()  : mixed
__get()  : mixed
__isset()  : bool
__set()  : void
__unset()  : void
getJsonVars()  : array<string|int, string>
jsonSerialize()  : stdClass
setJsonVars()  : static
toModel()  : array<string, scalar>
Convert the Entity to an associative array accepted by Model methods.
getObjectVars()  : array<string, mixed>
init()  : void
Used to initialize settings, set custom properties, etc.
jsonOptions()  : int
populate()  : void
propertyNotDefined()  : OutOfBoundsException
renderMethodName()  : string
setProperty()  : void
timezone()  : DateTimeZone
typeHint()  : mixed
typeHintAplus()  : mixed
typeHintCustom()  : mixed
typeHintNative()  : mixed

Properties

$_jsonOptions

protected int $_jsonOptions = \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE | \JSON_PRESERVE_ZERO_FRACTION | \JSON_THROW_ON_ERROR

$_jsonVars

protected array<string|int, mixed> $_jsonVars = []

$_timezone

protected string $_timezone = '+00:00'

Methods

__construct()

public __construct(array<string, mixed> $properties) : mixed
Parameters
$properties : array<string, mixed>
Return values
mixed

__get()

public __get(string $property) : mixed
Parameters
$property : string
Tags
throws
OutOfBoundsException

If property is not defined

Return values
mixed

__isset()

public __isset(string $property) : bool
Parameters
$property : string
Return values
bool

__set()

public __set(string $property, mixed $value) : void
Parameters
$property : string
$value : mixed
Tags
throws
OutOfBoundsException

If property is not defined

Return values
void

__unset()

public __unset(string $property) : void
Parameters
$property : string
Return values
void

getJsonVars()

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

jsonSerialize()

public jsonSerialize() : stdClass
Return values
stdClass

setJsonVars()

public setJsonVars(array<string|int, string> $vars) : static
Parameters
$vars : array<string|int, string>
Return values
static

toModel()

Convert the Entity to an associative array accepted by Model methods.

public toModel() : array<string, scalar>
Tags
throws
JsonException
Return values
array<string, scalar>

getObjectVars()

protected getObjectVars() : array<string, mixed>
Return values
array<string, mixed>

init()

Used to initialize settings, set custom properties, etc.

protected init() : void

Called in the constructor just after the properties be populated.

Return values
void

jsonOptions()

protected jsonOptions() : int
Return values
int

populate()

protected populate(array<string, mixed> $properties) : void
Parameters
$properties : array<string, mixed>
Return values
void

propertyNotDefined()

protected propertyNotDefined(string $property) : OutOfBoundsException
Parameters
$property : string
Return values
OutOfBoundsException

renderMethodName()

protected renderMethodName(string $type, string $property) : string
Parameters
$type : string

get or set

$property : string

Property name

Return values
string

setProperty()

protected setProperty(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed
Return values
void

timezone()

protected timezone() : DateTimeZone
Return values
DateTimeZone

typeHint()

protected typeHint(string $propertyType, mixed $value) : mixed
Parameters
$propertyType : string
$value : mixed
Return values
mixed

typeHintAplus()

protected typeHintAplus(string $propertyType, string $valueType, mixed $value) : mixed
Parameters
$propertyType : string
$valueType : string
$value : mixed
Return values
mixed

typeHintCustom()

protected typeHintCustom(string $propertyType, string $valueType, mixed $value) : mixed
Parameters
$propertyType : string
$valueType : string
$value : mixed
Return values
mixed

typeHintNative()

protected typeHintNative(string $propertyType, string $valueType, mixed $value) : mixed
Parameters
$propertyType : string
$valueType : string
$value : mixed
Return values
mixed

Search results