"Fossies" - the Fresh Open Source Software Archive

Member "OCSNG_UNIX_SERVER_2.6/ocsreports/require/tables/Table.php" (17 Apr 2019, 1655 Bytes) of package /linux/privat/OCSNG_UNIX_SERVER_2.6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 <?php
    2 /*
    3  * Copyright 2005-2016 OCSInventory-NG/OCSInventory-ocsreports contributors.
    4  * See the Contributors file for more details about them.
    5  *
    6  * This file is part of OCSInventory-NG/OCSInventory-ocsreports.
    7  *
    8  * OCSInventory-NG/OCSInventory-ocsreports is free software: you can redistribute
    9  * it and/or modify it under the terms of the GNU General Public License as
   10  * published by the Free Software Foundation, either version 2 of the License,
   11  * or (at your option) any later version.
   12  *
   13  * OCSInventory-NG/OCSInventory-ocsreports is distributed in the hope that it
   14  * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
   15  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   16  * GNU General Public License for more details.
   17  *
   18  * You should have received a copy of the GNU General Public License
   19  * along with OCSInventory-NG/OCSInventory-ocsreports. if not, write to the
   20  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   21  * MA 02110-1301, USA.
   22  */
   23 require_once('require/tables/Column.php');
   24 
   25 class Table {
   26     private $name;
   27     private $columns;
   28 
   29     public function __construct($name) {
   30         $this->name = $name;
   31         $this->columns = array();
   32     }
   33 
   34     public function getName() {
   35         return $this->name;
   36     }
   37 
   38     public function setName($name) {
   39         $this->name = $name;
   40     }
   41 
   42     public function addColumn(Column $col) {
   43         $this->columns[$col->getName()] = $col;
   44         return $this;
   45     }
   46 
   47     public function getColumns() {
   48         return $this->columns;
   49     }
   50 
   51     public function getColumn($name) {
   52         return $this->columns[$name];
   53     }
   54 
   55 }
   56 ?>