File indexing completed on 2025-05-04 05:29:09

0001 <?php
0002 /**
0003  *  ocs-webserver
0004  *
0005  *  Copyright 2016 by pling GmbH.
0006  *
0007  *    This file is part of ocs-webserver.
0008  *
0009  *    This program is free software: you can redistribute it and/or modify
0010  *    it under the terms of the GNU Affero General Public License as
0011  *    published by the Free Software Foundation, either version 3 of the
0012  *    License, or (at your option) any later version.
0013  *
0014  *    This program is distributed in the hope that it will be useful,
0015  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
0016  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0017  *    GNU Affero General Public License for more details.
0018  *
0019  *    You should have received a copy of the GNU Affero General Public License
0020  *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
0021  **/
0022 class Default_Model_DbRow_ProjectCcLicense extends Zend_Db_Table_Row_Abstract
0023 {
0024 
0025     protected $_data = array(
0026         'license_id' => null,
0027         'project_id' => null,
0028         'by' => 1,
0029         'nc' => 0,
0030         'nd' => 0,
0031         'sa' => 0
0032     );
0033 
0034     /** @var bool */
0035     protected $_storedLicense = false;
0036 
0037     /**
0038      * @return boolean
0039      */
0040     public function isStoredLicense()
0041     {
0042         return $this->_storedLicense;
0043     }
0044 
0045     /**
0046      * Constructor.
0047      *
0048      * Supported params for $config are:-
0049      * - table       = class name or object of type Zend_Db_Table_Abstract
0050      * - data        = values of columns in this row.
0051      *
0052      * @param  array $config OPTIONAL Array of user-specified config options.
0053      * @return void
0054      * @throws Zend_Db_Table_Row_Exception
0055      */
0056     public function __construct(array $config)
0057     {
0058         if (isset($config['stored']) && $config['stored'] === true) {
0059             $this->_storedLicense = true;
0060         }
0061 
0062         parent::__construct($config);
0063     }
0064 
0065 }