Example #1
0
 /**
  * @param mysqli $res
  * @return bool
  */
 protected function mysqlFetchObject($res)
 {
     $object = $res->fetch_object();
     if ($object === null) {
         return false;
     }
     return $object;
 }
 /**
  * Gets the next row of the result of the SQL query (as returned by Database::query) in an object form
  * @param mysqli $result The result from a call to sql_query (e.g. Database::query)
  * @param string $class Optional class name to instantiate
  * @param array $params Optional array of parameters
  * @return resource Object of class StdClass or the required class, containing the query result row
  * @author Yannick Warnier <*****@*****.**>
  */
 public static function fetch_object($result, $class = null, $params = null)
 {
     return !empty($class) ? is_array($params) ? $result->fetch_object($class, $params) : $result->fetch_object($class) : $result->fetch_object();
 }