public function getItem($key) {
		if (is_array($key)) {
			$key = $this->arrayHashFunction($key);
		}
		
		if (isset($this->_models[$key])) {
			return $this->_models[$key];
		}
		
		if (isset($this->_data[$key])) {
			$modelClass = $this->getModel();
			
			$item = $modelClass::factory($this->_data[$key]);
			$item->setCollection($this);
			
			if ($this->hasDatagate()) {
				$item->setDatagate($this->getDatagate());
			}
			
			if ($this->hasLocator()) {
				$item->setLocator($this->getLocator());
			}
			
			$this->_models[$key] = $item;
			
			return $item;
		}
	}
public function getItem($key) {
		if (is_array($key)) {
			$key = $this->arrayHashFunction($key);
		}
		
		if (isset($this->_models[$key])) {
			return $this->_models[$key];
		}
		
		if (isset($this->_data[$key])) {
			$modelClass = $this->getModel();
			
			$item = $modelClass::factory($this->_data[$key]);
			$item->setCollection($this);
			
			if ($this->hasDatagate()) {
				$item->setDatagate($this->getDatagate());
			}
			
			if ($this->hasLocator()) {
				$item->setLocator($this->getLocator());
			}
			
			$this->_models[$key] = $item;
			
			return $item;
		}
	}
public function getItem ( $ key ) { if ( is_array ( $ key ) ) { $ key = $ this -> arrayHashFunction ( $ key ) ; } if ( isset ( $ this -> _models [ $ key ] ) ) { return $ this -> _models [ $ key ] ; } if ( isset ( $ this -> _data [ $ key ] ) ) { $ modelClass = $ this -> getModel ( ) ; $ item = $ modelClass :: factory ( $ this -> _data [ $ key ] ) ; $ item -> setCollection ( $ this ) ; if ( $ this -> hasDatagate ( ) ) { $ item -> setDatagate ( $ this -> getDatagate ( ) ) ; } if ( $ this -> hasLocator ( ) ) { $ item -> setLocator ( $ this -> getLocator ( ) ) ; } $ this -> _models [ $ key ] = $ item ; return $ item ; } }
Get the item

@param  int | string $key
@return Model | null
Get the item