Sledgehammer Framework

BelongsToPlaceholder extends Base
in package

This Placeholder facilitates lazy loading of belongsTo relations.

A BelongsToPlaceholder object behaves like the object from the repository, but only retrieves the real object on-access or on-change.

Tags
todo

Implement ArrayAcces and Iterator interfaces. Which the target property might support.

Table of Contents

$__container  : stdClass
$__fields  : array<string|int, mixed>
$__placeholder  : string|stdClass
__call()  : mixed
Report that the $method doesn't exist.
__callStatic()  : mixed
Report that the $method doesn't exist.
__clone()  : mixed
__construct()  : mixed
__get()  : mixed
Report that $property doesn't exist.
__set()  : mixed
Report that $property doesn't exist and set the property to the given $value.
__toString()  : string
The object is used as an string.
__replacePlaceholder()  : mixed
Replace the placeholder with the referenced object.

Properties

$__placeholder

private string|stdClass $__placeholder

Initialy a reference "repository/model/id", but will be replaced with the referenced Object

Methods

__call()

Report that the $method doesn't exist.

public __call(mixed $method, mixed $arguments) : mixed
Parameters
$method : mixed
$arguments : mixed
Return values
mixed

__callStatic()

Report that the $method doesn't exist.

public static __callStatic(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
$method : string
$arguments : array<string|int, mixed>
Return values
mixed

__construct()

public __construct(mixed $reference, mixed $container[, mixed $fields = [] ]) : mixed
Parameters
$reference : mixed
$container : mixed
$fields : mixed = []
Return values
mixed

__get()

Report that $property doesn't exist.

public __get(mixed $property) : mixed
Parameters
$property : mixed
Return values
mixed

__set()

Report that $property doesn't exist and set the property to the given $value.

public __set(mixed $property, mixed $value) : mixed
Parameters
$property : mixed
$value : mixed
Return values
mixed

__toString()

The object is used as an string.

public __toString() : string
Return values
string

__replacePlaceholder()

Replace the placeholder with the referenced object.

private __replacePlaceholder() : mixed
Return values
mixed

Search results