public function setIterationMode($mode) {
		switch ($mode) {
			case self::ITERATION_STRAIGHT:
				$this->_map = array_keys($this->_data);
				break;
			
			case self::ITERATION_REVERSE:
				$this->_map = array_reverse(array_keys($this->_data));
				break;
			
			case self::ITERATION_EVEN:
				$this->_map = [];
				
				foreach (array_keys($this->_data) as $key => $value) {
					if ($key % 2 === 0) {
						$this->_map[] = $value;
					}
				}
				break;
				
			case self::ITERATION_ODD:
				$this->_map = [];
				
				foreach (array_keys($this->_data) as $key => $value) {
					if ($key % 2 !== 0) {
						$this->_map[] = $value;
					}
				}
				break;
		}
		
		return $this;
	}
public function setIterationMode($mode) {
		switch ($mode) {
			case self::ITERATION_STRAIGHT:
				$this->_map = array_keys($this->_data);
				break;
			
			case self::ITERATION_REVERSE:
				$this->_map = array_reverse(array_keys($this->_data));
				break;
			
			case self::ITERATION_EVEN:
				$this->_map = [];
				
				foreach (array_keys($this->_data) as $key => $value) {
					if ($key % 2 === 0) {
						$this->_map[] = $value;
					}
				}
				break;
				
			case self::ITERATION_ODD:
				$this->_map = [];
				
				foreach (array_keys($this->_data) as $key => $value) {
					if ($key % 2 !== 0) {
						$this->_map[] = $value;
					}
				}
				break;
		}
		
		return $this;
	}
public function setIterationMode ( $ mode ) { switch ( $ mode ) { case self :: ITERATION_STRAIGHT : $ this -> _map = array_keys ( $ this -> _data ) ; break ; case self :: ITERATION_REVERSE : $ this -> _map = array_reverse ( array_keys ( $ this -> _data ) ) ; break ; case self :: ITERATION_EVEN : $ this -> _map = [ ] ; foreach ( array_keys ( $ this -> _data ) as $ key => $ value ) { if ( $ key % 2 === 0 ) { $ this -> _map [ ] = $ value ; } } break ; case self :: ITERATION_ODD : $ this -> _map = [ ] ; foreach ( array_keys ( $ this -> _data ) as $ key => $ value ) { if ( $ key % 2 !== 0 ) { $ this -> _map [ ] = $ value ; } } break ; } return $ this ; }
Set mode of a collection's iteration

@param  string | int $mode
@return Collection
Set mode of a collection s iteration