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

protected method

Return the field name from a conditions key.

Parameters

  • string $field

    Field or identifier name.

Returns

string

Returns the field name without the table alias, if applicable.

Source

	protected function _fieldName($field) {
		$regex = '/^[a-z0-9_-]+\.[a-z0-9_-]+$/iS';

		if (strpos($field, '.') !== false && preg_match($regex, $field)) {
			list($first, $second) = explode('.', $field, 2);
			return $second;
		}
		return $field;
	}