lithium\util\Collection::prev()
Moves backward to the previous item.
Note: When already at the first item, moves to the last one.
Returns
mixedThe previous item or false
if the collection is empty. Returns the
last item, when already at the first item.
Source
public function prev() {
$value = prev($this->_data);
return key($this->_data) !== null ? $value : end($this->_data);
}