W3cubDocs

/Phalcon 2

Interface Phalcon\Mvc\Model\RelationInterface

Phalcon\Mvc\Model\RelationInterface initializer

Methods

abstract public setIntermediateRelation (string|array $intermediateFields, string $intermediateModel, string $intermediateReferencedFields)

Sets the intermediate model dat for has-*-through relations

abstract public int getType ()

Returns the relations type

abstract public string getReferencedModel ()

Returns the referenced model

abstract public string|array getFields ()

Returns the fields

abstract public string|array getReferencedFields ()

Returns the referenced fields

abstract public string|array getOptions ()

Returns the options

abstract public string|array isForeignKey ()

Check whether the relation act as a foreign key

abstract public string|array getForeignKey ()

Returns the foreign key configuration

abstract public boolean isThrough ()

Check whether the relation is a ‘many-to-many’ relation or not

abstract public string|array getIntermediateFields ()

Gets the intermediate fields for has-*-through relations

abstract public string getIntermediateModel ()

Gets the intermediate model for has-*-through relations

abstract public string|array getIntermediateReferencedFields ()

Gets the intermediate referenced fields for has-*-through relations

© 2011–2016 Phalcon Framework Team
Licensed under the Creative Commons Attribution License 3.0.
https://docs.phalconphp.com/en/2.0.0/api/Phalcon_Mvc_Model_RelationInterface.html