コード例 #1
0
ファイル: StructureTest.php プロジェクト: php-go/db-doctrine
 public function testConfig()
 {
     $config = $this->structure->getConfig();
     $this->assertArrayHasKey('many_many', $config);
     $this->assertArrayHasKey('tables', $config);
     $this->assertCount(5, $this->structure->getTables());
 }
コード例 #2
0
ファイル: Table.php プロジェクト: php-go/db-doctrine
 public function hasManyToManyTable($name)
 {
     $manyMany = $this->structure->getConfig()['many_many'];
     foreach ($manyMany as $mm) {
         if (in_array($this->getName(), $mm) && in_array($name, $mm)) {
             return true;
         }
     }
     return false;
 }