noalyss Version-9
export_data.class.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of NOALYSS.
5 *
6 * PhpCompta is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * PhpCompta is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with PhpCompta; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20// Copyright (2019) Author Dany De Bontridder <danydb@noalyss.eu>
21
22
23/**
24 * @file
25 * @brief
26 */
27abstract class Export_Data
28{
29
30 private $db_handler; //!< result of pg_query
31 private $aColumn_name; //!< duble array : key column name , value column header
32
33 function __construct($p_result, $paColum_name)
34 {
35 $this->db_handler=$p_result;
36 $this->aColumn_name=$paColum_name;
37 }
38
39 public function get_db_handler()
40 {
41 return $this->db_handler;
42 }
43
44 public function get_aColumn_name()
45 {
47 }
48
49 public function set_db_handler($db_handler)
50 {
51 $this->db_handler=$db_handler;
52 return $this;
53 }
54
56 {
57 $this->aColumn_name=$aColumn_name;
58 return $this;
59 }
60
61 abstract function export($p_destination_file);
62}
$db_handler
result of pg_query
$aColumn_name
duble array : key column name , value column header
export($p_destination_file)
__construct($p_result, $paColum_name)
set_db_handler($db_handler)
set_aColumn_name($aColumn_name)