lithium\data\Model::meta()

public static method

Gets or sets Model's metadata.

Parameters

  • string $key

    Model metadata key.

  • string $value

    Model metadata value.

Returns

mixed

Metadata value for a given key.

Source

	public static function meta($key = null, $value = null) {
		$self = static::object();
		$isArray = is_array($key);

		if ($value || $isArray) {
			$value ? $self->_meta[$key] = $value : $self->_meta = $key + $self->_meta;
			return;
		}
		return $self->_getMetaKey($isArray ? null : $key);
	}