Joomla Platform  13.1
Documentation des API du framework Joomla Platform
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Pages
mysql.php
Aller à la documentation de ce fichier.
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 export driver.
14  *
15  * @package Joomla.Platform
16  * @subpackage Database
17  * @since 11.1
18  */
20 {
21  /**
22  * Checks if all data and options are in order prior to exporting.
23  *
24  * @return JDatabaseExporterMysql Method supports chaining.
25  *
26  * @since 11.1
27  * @throws Exception if an error is encountered.
28  */
29  public function check()
30  {
31  // Check if the db connector has been set.
32  if (!($this->db instanceof JDatabaseDriverMysql))
33  {
34  throw new Exception('JPLATFORM_ERROR_DATABASE_CONNECTOR_WRONG_TYPE');
35  }
36 
37  // Check if the tables have been specified.
38  if (empty($this->from))
39  {
40  throw new Exception('JPLATFORM_ERROR_NO_TABLES_SPECIFIED');
41  }
42 
43  return $this;
44  }
45 }