Ejemplo n.º 1
0
 /**
  * Returns a PHP date() function compliant date format for the database driver.
  *
  * This method is provided for use where the query object is passed to a function for modification.
  * If you have direct access to the database object, it is recommended you use the getDateFormat method directly.
  *
  * @return  string  The format string.
  *
  * @since   1.0
  * @throws  \RuntimeException
  */
 public function dateFormat()
 {
     if (!$this->db instanceof DatabaseDriver) {
         throw new \RuntimeException('JLIB_DATABASE_ERROR_INVALID_DB_OBJECT');
     }
     return $this->db->getDateFormat();
 }