예제 #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!");
     }
 }
예제 #2
0
파일: SchemaTest.php 프로젝트: sigma-z/dive
 public function testHasView()
 {
     $this->assertTrue($this->schema->hasView('author_user_view'));
 }