lithium\data\source\Database::_constraints()

protected method

Auto escape string value to a field name value

Parameters

  • array $constraints

    The constraints array

Returns

array

The escaped constraints array

Source

	protected function _constraints(array $constraints) {
		foreach ($constraints as &$value) {
			if (is_string($value)) {
				$value = (object) $this->name($value);
			} elseif (is_array($value)) {
				$value = $this->_constraints($value);
			}
		}
		return $constraints;
	}