Ejemplo n.º 1
0
 /**
  * @throws ORMException
  */
 public function __construct()
 {
     if (!$this->hasTable()) {
         throw new ORMException('Not defined table name for: ' . $this->getTableName());
     }
     if ($this->defineConnectionName()) {
         ORM\Connection::setConnectionName(static::$connection);
     }
     $this->setConnection(ORM\Connection::connect());
 }