\Omega\Database Relationship

Relationship class.

The RelationShip class represents relationship between models. This class facilities relationship between models, providing a way to call method on a ModelCollector instance and act as a callable object or delegate method calls to the underlying ModelCollector.

Summary

Methods
Properties
Constants
__construct
__invoke
__call
collector
method
No public constants found
No protected methods found
No protected properties found
No protected constants found
No private methods found
No private properties found
No private constants found

Properties

$collector

$collector : \Omega\Database\ModelCollector

ModelCollector object.

Type

ModelCollector — Holds an instance of ModelCollector.

$method

$method : string

Method name.

Type

string — Holds the method name.

Methods

__construct()

__construct(\Omega\Database\ModelCollector  $collector, string  $method) : void

Relationship class constructor.

Parameters

\Omega\Database\ModelCollector $collector

Holds an instance of ModelCollector.

string $method

Holds the method name.

Returns

void —

__invoke()

__invoke(array  $parameters = []) : mixed

Call an object as a function.

Parameters

array $parameters

Holds an array of parameters.

Returns

mixed —

__call()

__call(string  $method, array  $parameters = []) : mixed

Invoking inaccessible methods in an object context.

Parameters

string $method

Holds the method name.

array $parameters

Holds an array of parameters.

Returns

mixed —