Relationships
in package
implements
RelationshipsInterface
Class Relationships
Tags
Table of Contents
Interfaces
- RelationshipsInterface
- Interface RelationshipsInterface
Properties
- $options : array<string|int, mixed>
- $parent : P
- $relationships : array<string|int, RelationshipInterface<T, P>>
Methods
- __construct() : mixed
- Relationships constructor.
- count() : int
- current() : RelationshipInterface<T, P>|null
- getModified() : array<string|int, RelationshipInterface<T, P>>
- isModified() : bool
- jsonSerialize() : array<string|int, mixed>
- key() : string
- next() : void
- offsetExists() : bool
- offsetGet() : RelationshipInterface<T, P>|null
- offsetSet() : mixed
- offsetUnset() : mixed
- rewind() : void
- valid() : bool
- createRelationship() : ToOneRelationship|ToManyRelationship
Properties
$options
protected
array<string|int, mixed>
$options
$parent
protected
P
$parent
$relationships
protected
array<string|int, RelationshipInterface<T, P>>
$relationships
Methods
__construct()
Relationships constructor.
public
__construct(P $parent, array<string|int, mixed> $options) : mixed
Parameters
- $parent : P
- $options : array<string|int, mixed>
count()
public
count() : int
Tags
Return values
intcurrent()
public
current() : RelationshipInterface<T, P>|null
Return values
RelationshipInterface<T, P>|nullgetModified()
public
getModified() : array<string|int, RelationshipInterface<T, P>>
Tags
Return values
array<string|int, RelationshipInterface<T, P>>isModified()
public
isModified() : bool
Tags
Return values
booljsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>key()
public
key() : string
Tags
Return values
stringnext()
public
next() : void
Tags
offsetExists()
public
offsetExists(string $offset) : bool
Parameters
- $offset : string
Tags
Return values
booloffsetGet()
public
offsetGet(string $offset) : RelationshipInterface<T, P>|null
Parameters
- $offset : string
Return values
RelationshipInterface<T, P>|nulloffsetSet()
public
offsetSet(string $offset, mixed $value) : mixed
Parameters
- $offset : string
- $value : mixed
offsetUnset()
public
offsetUnset(string $offset) : mixed
Parameters
- $offset : string
rewind()
public
rewind() : void
Tags
valid()
public
valid() : bool
Tags
Return values
boolcreateRelationship()
private
createRelationship(string $name, array<string|int, mixed> $options) : ToOneRelationship|ToManyRelationship
Parameters
- $name : string
- $options : array<string|int, mixed>