english/libraries/joomla/database/database.php
/**
	 * Method to get the first row of the result set from the database query as an object.
	 *
	 * @param   string  $class  The class name to use for the returned row object.
	 *
	 * @return  mixed   The return value or null if the query failed.
	 *
	 * @since   11.1
	 * @throws  DatabaseException
	 */
Method to get the first row of the result set from the database query as an object.
@param   string  $class  The class name to use for the returned row object.

@return  mixed   The return value or null if the query failed.


Method to get the first row of the result set from the database query as an object . @param string $class The class name to use for the returned row object . @return mixed The return value or null if the query failed .
public function loadObject($class = 'stdClass')
	{
		$ret = null;
		if (!($cursor = $this->query())) {
			return null;
		}
		if ($object = $this->fetchObject($cursor, $class)) {
			$ret = $object;
		}
		$this->freeResult($cursor);
		return $ret;
	}
public function loadObject ( $ class = 'stdClass' ) { $ ret = null ; if ( ! ( $ cursor = $ this -> query ( ) ) ) { return null ; } if ( $ object = $ this -> fetchObject ( $ cursor , $ class ) ) { $ ret = $ object ; } $ this -> freeResult ( $ cursor ) ; return $ ret ; }
Method to get the first row of the result set from the database query as an object.
Method to get the first row of the result set from the database query as an object .
// Initialise variables. // Execute the query and get the result set cursor. // Get the first row from the result set as an object of type $class. // Free up system resources and return.