Junction
extends Base
in package
implements
ArrayAccess
A entry in a many-to-many relation where the link/bridge table has additional fields.
Behaves as the linked object, but with additional properties.
Interfaces, Classes, Traits and Enums
- ArrayAccess
Table of Contents
- $dynamicFields : bool
- Allow new properties to be added to $this->fields.
- $fields : array<string|int, mixed>
- The additional fields in the relation.
- $instance : object
- The object this junction links to.
- __call() : mixed
- Pass all methods to the linked $instance.
- __callStatic() : mixed
- Report that the $method doesn't exist.
- __construct() : mixed
- Constructor.
- __get() : mixed
- Get a property or fields value.
- __set() : mixed
- Set a property or fields.
- __toString() : string
- The object is used as an string.
- offsetExists() : mixed
- offsetGet() : mixed
- offsetSet() : mixed
- offsetUnset() : mixed
Properties
$dynamicFields
Allow new properties to be added to $this->fields.
protected
bool
$dynamicFields
$fields
The additional fields in the relation.
protected
array<string|int, mixed>
$fields
=>
$instance
The object this junction links to.
protected
object
$instance
Methods
__call()
Pass all methods to the linked $instance.
public
__call(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : string
- $arguments : array<string|int, 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()
Constructor.
public
__construct(object $instance[, array<string|int, mixed> $fields = [] ][, bool $noAdditionalFields = false ]) : mixed
Parameters
- $instance : object
-
The instance to link to.
- $fields : array<string|int, mixed> = []
-
The additional fields in the relation.
- $noAdditionalFields : bool = false
-
The $fields parameter contains all fields for this junction.
Return values
mixed —__get()
Get a property or fields value.
public
__get(string $property) : mixed
Parameters
- $property : string
Return values
mixed —__set()
Set a property or fields.
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 $index) : mixed
Parameters
- $index : mixed
Return values
mixed —offsetGet()
public
offsetGet(mixed $index) : mixed
Parameters
- $index : mixed
Return values
mixed —offsetSet()
public
offsetSet(mixed $index, mixed $value) : mixed
Parameters
- $index : mixed
- $value : mixed
Return values
mixed —offsetUnset()
public
offsetUnset(mixed $index) : mixed
Parameters
- $index : mixed