| [ Index ] |
PHP Cross Reference of Joomla 2.5.4 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @package Joomla.Platform 4 * @subpackage Database 5 * 6 * @copyright Copyright (C) 2005 - 2012 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 require_once dirname(__FILE__) . '/mysqlimporter.php'; 13 14 /** 15 * MySQL import driver. 16 * 17 * @package Joomla.Platform 18 * @subpackage Database 19 * @since 11.1 20 */ 21 class JDatabaseImporterMySQLi extends JDatabaseImporterMySQL 22 { 23 /** 24 * Checks if all data and options are in order prior to exporting. 25 * 26 * @return JDatabaseImporterMySQLi Method supports chaining. 27 * 28 * @since 11.1 29 * @throws Exception if an error is encountered. 30 */ 31 public function check() 32 { 33 // Check if the db connector has been set. 34 if (!($this->db instanceof JDatabaseMySqli)) 35 { 36 throw new Exception('JPLATFORM_ERROR_DATABASE_CONNECTOR_WRONG_TYPE'); 37 } 38 39 // Check if the tables have been specified. 40 if (empty($this->from)) 41 { 42 throw new Exception('JPLATFORM_ERROR_NO_TABLES_SPECIFIED'); 43 } 44 45 return $this; 46 } 47 48 /** 49 * Sets the database connector to use for exporting structure and/or data from MySQL. 50 * 51 * @param JDatabaseMySQLi $db The database connector. 52 * 53 * @return JDatabaseImporterMySQLi Method supports chaining. 54 * 55 * @since 11.1 56 */ 57 public function setDbo(JDatabaseMySQLi $db) 58 { 59 $this->db = $db; 60 61 return $this; 62 } 63 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Tue Apr 3 11:40:28 2012 | Cross-referenced by PHPXref 0.7.1 |