File indexing completed on 2024-12-29 05:27:36
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Feed_Pubsubhubbub 0017 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0018 * @license http://framework.zend.com/license/new-bsd New BSD License 0019 * @version $Id$ 0020 */ 0021 0022 0023 /** @see Zend_Db_Table */ 0024 // require_once 'Zend/Db/Table.php'; 0025 0026 /** 0027 * @see Zend_Registry 0028 * Seems to fix the file not being included by Zend_Db_Table... 0029 */ 0030 // require_once 'Zend/Registry.php'; 0031 0032 /** 0033 * @category Zend 0034 * @package Zend_Feed_Pubsubhubbub 0035 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0036 * @license http://framework.zend.com/license/new-bsd New BSD License 0037 */ 0038 class Zend_Feed_Pubsubhubbub_Model_ModelAbstract 0039 { 0040 /** 0041 * Zend_Db_Table instance to host database methods 0042 * 0043 * @var Zend_Db_Table 0044 */ 0045 protected $_db = null; 0046 0047 /** 0048 * Constructor 0049 * 0050 * @param Zend_Db_Table_Abstract $tableGateway 0051 */ 0052 public function __construct(Zend_Db_Table_Abstract $tableGateway = null) 0053 { 0054 if ($tableGateway === null) { 0055 $parts = explode('_', get_class($this)); 0056 $table = strtolower(array_pop($parts)); 0057 $this->_db = new Zend_Db_Table($table); 0058 } else { 0059 $this->_db = $tableGateway; 0060 } 0061 } 0062 0063 }