public function loadObjectList($key = '', $class = 'stdClass')
	{
		$rows = [];

		// Execute the query
		if (!$this->execute())
		{
			return null;
		}

		// Get all of the rows from the result set as objects of type $class
		while ($row = $this->fetchObject($class))
		{
			if ($key)
			{
				$rows[$row->$key] = $row;
			}
			else
			{
				$rows[] = $row;
			}
		}

		// Free up system resources and return the rows
		$this->freeResult();

		return $rows;
	}
public function loadObjectList($key = '', $class = 'stdClass')
	{
		$rows = [];

		// Execute the query
		if (!$this->execute())
		{
			return null;
		}

		// Get all of the rows from the result set as objects of type $class
		while ($row = $this->fetchObject($class))
		{
			if ($key)
			{
				$rows[$row->$key] = $row;
			}
			else
			{
				$rows[] = $row;
			}
		}

		// Free up system resources and return the rows
		$this->freeResult();

		return $rows;
	}
public function loadObjectList ( $ key = '' , $ class = 'stdClass' ) { $ rows = [ ] ; // Execute the query if ( ! $ this -> execute ( ) ) { return null ; } // Get all of the rows from the result set as objects of type $class while ( $ row = $ this -> fetchObject ( $ class ) ) { if ( $ key ) { $ rows [ $ row -> $ key ] = $ row ; } else { $ rows [ ] = $ row ; } } // Free up system resources and return the rows $ this -> freeResult ( ) ; return $ rows ; }
Gets an array of the result set rows from the database query where each row is an object.
The array of objects can optionally be keyed by a field name, but defaults to a sequential numeric array.

NOTE: Choosing to key the result array by a non-unique field name can result in unwanted
behavior and should be avoided.

@param   string  $key    The name of the field on which to key the result array
@param   string  $class  The class name to use for the returned row objects
@return  array
@since   2.0.0
Gets an array of the result set rows from the database query where each row is an object . The array of objects can optionally be keyed by a field name but defaults to a sequential numeric array .