Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Feed / PubSubHubbub / Model / AbstractModel.php
blob023fe8ed67d317ae3c0232e8451eb3458e9ed5e0
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\Feed\PubSubHubbub\Model;
12 use Zend\Db\TableGateway\TableGateway;
13 use Zend\Db\TableGateway\TableGatewayInterface;
15 class AbstractModel
17 /**
18 * Zend\Db\TableGateway\TableGatewayInterface instance to host database methods
20 * @var TableGatewayInterface
22 protected $db = null;
24 /**
25 * Constructor
27 * @param null|TableGatewayInterface $tableGateway
29 public function __construct(TableGatewayInterface $tableGateway = null)
31 if ($tableGateway === null) {
32 $parts = explode('\\', get_class($this));
33 $table = strtolower(array_pop($parts));
34 $this->db = new TableGateway($table, null);
35 } else {
36 $this->db = $tableGateway;