lithium\data\Collection::key()

public method

Returns the currently pointed to record's unique key.

Parameters

  • boolean $full

    If true, returns the complete key.

Returns

mixed

Source

	public function key($full = false) {
		if ($this->_started === false) {
			$this->current();
		}
		if ($this->_valid) {
			$key = key($this->_data);
			return (is_array($key) && !$full) ? reset($key) : $key;
		}
		return null;
	}