Sledgehammer Framework

HasManyPlaceholder extends Base
in package
implements ArrayAccess, IteratorAggregate, Countable

This Placeholder facilitates lazy loading of hasMany relations.

A HasManyPlaceholder object behaves like an Collection containing all related objects from the repository, but only retrieves the objects on-access or on-change.

Interfaces, Classes, Traits and Enums

ArrayAccess
IteratorAggregate
Countable

Table of Contents

$__container  : stdClass
$__placeholder  : string|Collection
__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.
count()  : mixed
getIterator()  : mixed
offsetExists()  : mixed
offsetGet()  : mixed
offsetSet()  : mixed
offsetUnset()  : mixed
replacePlaceholder()  : mixed
Replace the placeholder and return the array.

Properties

$__container

private stdClass $__container

The instance this placeholder belongs to

$__placeholder

private string|Collection $__placeholder

Initialy a reference "repository/model/property", but will be replaced with the referenced Collection

Methods

__call()

Report that the $method doesn't exist.

public __call(mixed $method, mixed $args) : mixed
Parameters
$method : mixed
$args : 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
Parameters
$reference : mixed
$container : mixed
Return values
mixed

__get()

Report that $property doesn't exist.

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

__set()

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

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

__toString()

The object is used as an string.

public __toString() : string
Return values
string

offsetExists()

public offsetExists(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetGet()

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetSet()

public offsetSet(mixed $offset, mixed $value) : mixed
Parameters
$offset : mixed
$value : mixed
Return values
mixed

offsetUnset()

public offsetUnset(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

replacePlaceholder()

Replace the placeholder and return the array.

private replacePlaceholder() : mixed
Return values
mixed

Search results