lithium\data\collection\MultiKeyRecordSet::offsetExists()

public method

Checks to see if a record with the given index key is in the record set. If the record cannot be found, and not all records have been loaded into the set, it will continue loading records until either all available records have been loaded, or a matching key has been found.

Parameters

  • mixed $offset

    The ID of the record to check for.

Returns

boolean

Returns true if the record's ID is found in the set, otherwise false.

Source

	public function offsetExists($offset) {
		$offset = (!$offset || $offset === true) ? 0 : $offset;
		$this->offsetGet($offset);
		if (in_array($offset, $this->_index)) {
			return true;
		}
		return false;
	}