You are here

public function AbstractModel::__construct in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-feed/src/PubSubHubbub/Model/AbstractModel.php \Zend\Feed\PubSubHubbub\Model\AbstractModel::__construct()

Constructor

Parameters

null|TableGatewayInterface $tableGateway:

File

vendor/zendframework/zend-feed/src/PubSubHubbub/Model/AbstractModel.php, line 29

Class

AbstractModel

Namespace

Zend\Feed\PubSubHubbub\Model

Code

public function __construct(TableGatewayInterface $tableGateway = null) {
  if ($tableGateway === null) {
    $parts = explode('\\', get_class($this));
    $table = strtolower(array_pop($parts));
    $this->db = new TableGateway($table, null);
  }
  else {
    $this->db = $tableGateway;
  }
}