Timothy Warren | 817af19 | 2012-02-16 08:28:00 -0500 | [diff] [blame] | 1 | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 2 | /** |
| 3 | * CodeIgniter |
| 4 | * |
Phil Sturgeon | 07c1ac8 | 2012-03-09 17:03:37 +0000 | [diff] [blame] | 5 | * An open source application development framework for PHP 5.2.4 or newer |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 6 | * |
| 7 | * NOTICE OF LICENSE |
Timothy Warren | 817af19 | 2012-02-16 08:28:00 -0500 | [diff] [blame] | 8 | * |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 9 | * Licensed under the Open Software License version 3.0 |
Timothy Warren | 817af19 | 2012-02-16 08:28:00 -0500 | [diff] [blame] | 10 | * |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 11 | * This source file is subject to the Open Software License (OSL 3.0) that is |
| 12 | * bundled with this package in the files license.txt / license.rst. It is |
| 13 | * also available through the world wide web at this URL: |
| 14 | * http://opensource.org/licenses/OSL-3.0 |
| 15 | * If you did not receive a copy of the license and are unable to obtain it |
| 16 | * through the world wide web, please send an email to |
| 17 | * licensing@ellislab.com so we can send you a copy immediately. |
| 18 | * |
| 19 | * @package CodeIgniter |
| 20 | * @author EllisLab Dev Team |
| 21 | * @copyright Copyright (c) 2008 - 2012, EllisLab, Inc. (http://ellislab.com/) |
| 22 | * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) |
| 23 | * @link http://codeigniter.com |
| 24 | * @since Version 3.0 |
| 25 | * @filesource |
| 26 | */ |
| 27 | |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 28 | /** |
| 29 | * Interbase/Firebird Utility Class |
| 30 | * |
| 31 | * @category Database |
| 32 | * @author EllisLab Dev Team |
| 33 | * @link http://codeigniter.com/user_guide/database/ |
| 34 | */ |
| 35 | class CI_DB_interbase_utility extends CI_DB_utility { |
| 36 | |
Andrey Andreev | b457a40 | 2012-04-09 16:11:56 +0300 | [diff] [blame^] | 37 | protected $_list_databases = FALSE; |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 38 | |
| 39 | /** |
| 40 | * Interbase/Firebird Export |
| 41 | * |
Timothy Warren | ab189e1 | 2012-02-22 10:34:23 -0500 | [diff] [blame] | 42 | * @param string $filename |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 43 | * @return mixed |
| 44 | */ |
Andrey Andreev | b457a40 | 2012-04-09 16:11:56 +0300 | [diff] [blame^] | 45 | protected function backup($filename) |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 46 | { |
Timothy Warren | ab189e1 | 2012-02-22 10:34:23 -0500 | [diff] [blame] | 47 | if ($service = ibase_service_attach($this->db->hostname, $this->db->username, $this->db->password)) |
| 48 | { |
| 49 | $res = ibase_backup($service, $this->db->database, $filename.'.fbk'); |
Andrey Andreev | b457a40 | 2012-04-09 16:11:56 +0300 | [diff] [blame^] | 50 | |
| 51 | // Close the service connection |
Timothy Warren | ab189e1 | 2012-02-22 10:34:23 -0500 | [diff] [blame] | 52 | ibase_service_detach($service); |
Timothy Warren | ab189e1 | 2012-02-22 10:34:23 -0500 | [diff] [blame] | 53 | return $res; |
| 54 | } |
Andrey Andreev | b457a40 | 2012-04-09 16:11:56 +0300 | [diff] [blame^] | 55 | |
| 56 | return FALSE; |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 57 | } |
Andrey Andreev | b457a40 | 2012-04-09 16:11:56 +0300 | [diff] [blame^] | 58 | |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | /* End of file interbase_utility.php */ |
| 62 | /* Location: ./system/database/drivers/interbase/interbase_utility.php */ |