blob: 1b92af9b679a5c48c5487b7ff6b7a5175774e0db [file] [log] [blame]
Timothy Warren817af192012-02-16 08:28:00 -05001<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Timothy Warren76e04352012-02-14 11:55:17 -05002/**
3 * CodeIgniter
4 *
Phil Sturgeon07c1ac82012-03-09 17:03:37 +00005 * An open source application development framework for PHP 5.2.4 or newer
Timothy Warren76e04352012-02-14 11:55:17 -05006 *
7 * NOTICE OF LICENSE
Timothy Warren817af192012-02-16 08:28:00 -05008 *
Timothy Warren76e04352012-02-14 11:55:17 -05009 * Licensed under the Open Software License version 3.0
Timothy Warren817af192012-02-16 08:28:00 -050010 *
Timothy Warren76e04352012-02-14 11:55:17 -050011 * 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 Warren76e04352012-02-14 11:55:17 -050028/**
29 * Interbase/Firebird Utility Class
30 *
31 * @category Database
32 * @author EllisLab Dev Team
33 * @link http://codeigniter.com/user_guide/database/
34 */
35class CI_DB_interbase_utility extends CI_DB_utility {
36
Andrey Andreevb457a402012-04-09 16:11:56 +030037 protected $_list_databases = FALSE;
Timothy Warren76e04352012-02-14 11:55:17 -050038
39 /**
40 * Interbase/Firebird Export
41 *
Timothy Warrenab189e12012-02-22 10:34:23 -050042 * @param string $filename
Timothy Warren76e04352012-02-14 11:55:17 -050043 * @return mixed
44 */
Andrey Andreevb457a402012-04-09 16:11:56 +030045 protected function backup($filename)
Timothy Warren76e04352012-02-14 11:55:17 -050046 {
Timothy Warrenab189e12012-02-22 10:34:23 -050047 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 Andreevb457a402012-04-09 16:11:56 +030050
51 // Close the service connection
Timothy Warrenab189e12012-02-22 10:34:23 -050052 ibase_service_detach($service);
Timothy Warrenab189e12012-02-22 10:34:23 -050053 return $res;
54 }
Andrey Andreevb457a402012-04-09 16:11:56 +030055
56 return FALSE;
Timothy Warren76e04352012-02-14 11:55:17 -050057 }
Andrey Andreevb457a402012-04-09 16:11:56 +030058
Timothy Warren76e04352012-02-14 11:55:17 -050059}
60
61/* End of file interbase_utility.php */
62/* Location: ./system/database/drivers/interbase/interbase_utility.php */