lithium\data\source\Http::relationship()

public method

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

Parameters

  • string $class
  • string $type
  • string $name
  • array $options

Returns

array

Returns an array containing the configuration for a model relationship.

Source

	public function relationship($class, $type, $name, array $options = []) {
		if (isset($this->_classes['relationship'])) {
			return Libraries::instance(
				null, 'relationship', compact('type', 'name') + $options, $this->_classes
			);
		}
		return null;
	}