Source for file mysql.php

Documentation is available at mysql.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Platform
  4.  * @subpackage  Database
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE
  8.  */
  9.  
  10. defined('JPATH_PLATFORM'or die;
  11.  
  12. /**
  13.  * MySQL import driver.
  14.  *
  15.  * @package     Joomla.Platform
  16.  * @subpackage  Database
  17.  * @since       11.1
  18.  */
  19. {
  20.     /**
  21.      * Checks if all data and options are in order prior to exporting.
  22.      *
  23.      * @return  JDatabaseImporterMysql  Method supports chaining.
  24.      *
  25.      * @since   11.1
  26.      * @throws  Exception if an error is encountered.
  27.      */
  28.     public function check()
  29.     {
  30.         // Check if the db connector has been set.
  31.         if (!($this->db instanceof JDatabaseDriverMysql))
  32.         {
  33.             throw new Exception('JPLATFORM_ERROR_DATABASE_CONNECTOR_WRONG_TYPE');
  34.         }
  35.  
  36.         // Check if the tables have been specified.
  37.         if (empty($this->from))
  38.         {
  39.             throw new Exception('JPLATFORM_ERROR_NO_TABLES_SPECIFIED');
  40.         }
  41.  
  42.         return $this;
  43.     }
  44. }

Documentation generated on Tue, 19 Nov 2013 15:09:06 +0100 by phpDocumentor 1.4.3