blob: 06de677b6e562403ac9683134d97f8813efa4086 [file] [log] [blame]
Andrey Andreevc5536aa2012-11-01 17:33:58 +02001<?php
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 */
Andrey Andreevc5536aa2012-11-01 17:33:58 +020027defined('BASEPATH') OR exit('No direct script access allowed');
Timothy Warren76e04352012-02-14 11:55:17 -050028
Timothy Warren76e04352012-02-14 11:55:17 -050029/**
30 * Interbase/Firebird Utility Class
31 *
32 * @category Database
33 * @author EllisLab Dev Team
34 * @link http://codeigniter.com/user_guide/database/
35 */
Andrey Andreev26086872012-07-05 11:21:58 +030036class CI_DB_ibase_utility extends CI_DB_utility {
Timothy Warren76e04352012-02-14 11:55:17 -050037
Andrey Andreevb457a402012-04-09 16:11:56 +030038 protected $_list_databases = FALSE;
Timothy Warren76e04352012-02-14 11:55:17 -050039
40 /**
41 * Interbase/Firebird Export
42 *
Timothy Warrenab189e12012-02-22 10:34:23 -050043 * @param string $filename
Timothy Warren76e04352012-02-14 11:55:17 -050044 * @return mixed
45 */
Cuscod4fb95f2012-05-05 03:22:24 +080046 protected function _backup($filename)
Timothy Warren76e04352012-02-14 11:55:17 -050047 {
Timothy Warrenab189e12012-02-22 10:34:23 -050048 if ($service = ibase_service_attach($this->db->hostname, $this->db->username, $this->db->password))
49 {
50 $res = ibase_backup($service, $this->db->database, $filename.'.fbk');
Andrey Andreevb457a402012-04-09 16:11:56 +030051
52 // Close the service connection
Timothy Warrenab189e12012-02-22 10:34:23 -050053 ibase_service_detach($service);
Timothy Warrenab189e12012-02-22 10:34:23 -050054 return $res;
55 }
Andrey Andreevb457a402012-04-09 16:11:56 +030056
57 return FALSE;
Timothy Warren76e04352012-02-14 11:55:17 -050058 }
Andrey Andreevb457a402012-04-09 16:11:56 +030059
Timothy Warren76e04352012-02-14 11:55:17 -050060}
61
Andrey Andreev26086872012-07-05 11:21:58 +030062/* End of file ibase_utility.php */
63/* Location: ./system/database/drivers/ibase/ibase_utility.php */