english/libraries/joomla/application/component/modellist.php
/**
	 * Method to cache the last query constructed.
	 *
	 * This method ensures that the query is contructed only once for a given state of the model.
	 *
	 * @return  JDatabaseQuery  A JDatabaseQuery object
	 *
	 * @since   11.1
	 */
Method to cache the last query constructed.
This method ensures that the query is contructed only once for a given state of the model.




Method to cache the last query constructed . This method ensures that the query is contructed only once for a given state of the model .
protected function _getListQuery()
	{
		static $lastStoreId;
		$currentStoreId = $this->getStoreId();
		if ($lastStoreId != $currentStoreId || empty($this->query)) {
			$lastStoreId = $currentStoreId;
			$this->query = $this->getListQuery();
		}
		return $this->query;
	}
protected function _getListQuery ( ) { static $ lastStoreId ; $ currentStoreId = $ this -> getStoreId ( ) ; if ( $ lastStoreId != $ currentStoreId || empty ( $ this -> query ) ) { $ lastStoreId = $ currentStoreId ; $ this -> query = $ this -> getListQuery ( ) ; } return $ this -> query ; }
Method to cache the last query constructed.
Method to cache the last query constructed .
// Capture the last store id used. // Compute the current store id. // If the last store id is different from the current, refresh the query.