lithium\data\Source::relationship()

abstract public method

Defines or modifies the default settings of a relationship between two models.

Parameters

  • $class the

    primary model of the relationship

  • $type the

    type of the relationship (hasMany, hasOne, belongsTo)

  • $name the

    name of the relationship

  • array $options

    relationship options

Returns

array

Returns an array containing the configuration for a model relationship.

Source

	abstract public function relationship($class, $type, $name, array $options = []);