Andrey Andreev | c5536aa | 2012-11-01 17:33:58 +0200 | [diff] [blame] | 1 | <?php |
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 | */ |
Andrey Andreev | c5536aa | 2012-11-01 17:33:58 +0200 | [diff] [blame] | 27 | defined('BASEPATH') OR exit('No direct script access allowed'); |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 28 | |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 29 | /** |
| 30 | * Interbase/Firebird Utility Class |
| 31 | * |
| 32 | * @category Database |
| 33 | * @author EllisLab Dev Team |
| 34 | * @link http://codeigniter.com/user_guide/database/ |
| 35 | */ |
Andrey Andreev | 2608687 | 2012-07-05 11:21:58 +0300 | [diff] [blame] | 36 | class CI_DB_ibase_utility extends CI_DB_utility { |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 37 | |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 38 | /** |
Andrey Andreev | c98e93a | 2012-11-02 02:04:59 +0200 | [diff] [blame^] | 39 | * Export |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 40 | * |
Timothy Warren | ab189e1 | 2012-02-22 10:34:23 -0500 | [diff] [blame] | 41 | * @param string $filename |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 42 | * @return mixed |
| 43 | */ |
Cusco | d4fb95f | 2012-05-05 03:22:24 +0800 | [diff] [blame] | 44 | protected function _backup($filename) |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 45 | { |
Timothy Warren | ab189e1 | 2012-02-22 10:34:23 -0500 | [diff] [blame] | 46 | if ($service = ibase_service_attach($this->db->hostname, $this->db->username, $this->db->password)) |
| 47 | { |
| 48 | $res = ibase_backup($service, $this->db->database, $filename.'.fbk'); |
Andrey Andreev | b457a40 | 2012-04-09 16:11:56 +0300 | [diff] [blame] | 49 | |
| 50 | // Close the service connection |
Timothy Warren | ab189e1 | 2012-02-22 10:34:23 -0500 | [diff] [blame] | 51 | ibase_service_detach($service); |
Timothy Warren | ab189e1 | 2012-02-22 10:34:23 -0500 | [diff] [blame] | 52 | return $res; |
| 53 | } |
Andrey Andreev | b457a40 | 2012-04-09 16:11:56 +0300 | [diff] [blame] | 54 | |
| 55 | return FALSE; |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 56 | } |
Andrey Andreev | b457a40 | 2012-04-09 16:11:56 +0300 | [diff] [blame] | 57 | |
Timothy Warren | 76e0435 | 2012-02-14 11:55:17 -0500 | [diff] [blame] | 58 | } |
| 59 | |
Andrey Andreev | 2608687 | 2012-07-05 11:21:58 +0300 | [diff] [blame] | 60 | /* End of file ibase_utility.php */ |
| 61 | /* Location: ./system/database/drivers/ibase/ibase_utility.php */ |