Exemplo n.º 1
0
 /**
  * initializes table instance
  *
  * @param  string $tableName
  * @throws SchemaException
  */
 private function initTable($tableName)
 {
     if (!isset($this->tables[$tableName])) {
         if ($this->schema->hasTable($tableName)) {
             $this->tables[$tableName] = $this->createTable($tableName);
             return;
         }
         if ($this->schema->hasView($tableName)) {
             $this->tables[$tableName] = $this->createView($tableName);
             return;
         }
         throw new SchemaException("Table/View '{$tableName}' not found!");
     }
 }
Exemplo n.º 2
0
 public function testHasView()
 {
     $this->assertTrue($this->schema->hasView('author_user_view'));
 }