Documentation

RelationManager
in package

Class to handle collections of relations.

Table of Contents

$relations  : array<string|int, mixed>
Collection of relations
__construct()  : mixed
add()  : RelationManager
Add a relation to the collection The input parameters match the 'Relation' class input parameters.
edit()  : RelationManager
Edit a relation
get()  : mixed
Get a relation by name, or all of them if no name was provided
has()  : bool
Check if a relation exists

Properties

$relations

Collection of relations

public array<string|int, mixed> $relations = []

Methods

add()

Add a relation to the collection The input parameters match the 'Relation' class input parameters.

public add(array<string|int, mixed> $params) : RelationManager
Parameters
$params : array<string|int, mixed>
Return values
RelationManager

edit()

Edit a relation

public edit(mixed $name[, array<string|int, mixed> $params = [] ]) : RelationManager

Changes relation attributes based on the values provided in the $params associative array.

Parameters
$name : mixed
$params : array<string|int, mixed> = []
Return values
RelationManager

get()

Get a relation by name, or all of them if no name was provided

public get([null|string $name = null ][, bool $noCase = false ]) : mixed
Parameters
$name : null|string = null
$noCase : bool = false
Return values
mixed

has()

Check if a relation exists

public has(string $name[, bool $noCase = false ]) : bool
Parameters
$name : string
$noCase : bool = false
Return values
bool

Search results