1 <?php
2 /**
3 * @package Joomla.Platform
4 * @subpackage Database
5 *
6 * @copyright Copyright (C) 2005 - 2017 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 * @since 11.1
16 * @deprecated 4.0 Use MySQLi or PDO MySQL instead
17 */
18 class JDatabaseExporterMysql extends JDatabaseExporterMysqli
19 {
20 /**
21 * Checks if all data and options are in order prior to exporting.
22 *
23 * @return JDatabaseExporterMysql 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 }
45