blob: 5eb209ae14beb3be0e181a508c50ffba74d9b1b1 [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
Timothy Warren76e04352012-02-14 11:55:17 -050038 /**
Andrey Andreevc98e93a2012-11-02 02:04:59 +020039 * Export
Timothy Warren76e04352012-02-14 11:55:17 -050040 *
Timothy Warrenab189e12012-02-22 10:34:23 -050041 * @param string $filename
Timothy Warren76e04352012-02-14 11:55:17 -050042 * @return mixed
43 */
Cuscod4fb95f2012-05-05 03:22:24 +080044 protected function _backup($filename)
Timothy Warren76e04352012-02-14 11:55:17 -050045 {
Timothy Warrenab189e12012-02-22 10:34:23 -050046 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 Andreevb457a402012-04-09 16:11:56 +030049
50 // Close the service connection
Timothy Warrenab189e12012-02-22 10:34:23 -050051 ibase_service_detach($service);
Timothy Warrenab189e12012-02-22 10:34:23 -050052 return $res;
53 }
Andrey Andreevb457a402012-04-09 16:11:56 +030054
55 return FALSE;
Timothy Warren76e04352012-02-14 11:55:17 -050056 }
Andrey Andreevb457a402012-04-09 16:11:56 +030057
Timothy Warren76e04352012-02-14 11:55:17 -050058}
59
Andrey Andreev26086872012-07-05 11:21:58 +030060/* End of file ibase_utility.php */
61/* Location: ./system/database/drivers/ibase/ibase_utility.php */