예제 #1
0
파일: Foreign.php 프로젝트: nmx/Modyllic
 function equal_to(Modyllic_Schema_Index $other, array $fromnames = null)
 {
     if (!parent::equal_to($other)) {
         return false;
     }
     if ($this->references != $other->references) {
         return false;
     }
     if ($this->weak != $other->weak) {
         return false;
     }
     return true;
 }
예제 #2
0
파일: Parser.php 프로젝트: nmx/Modyllic
 function add_index(Modyllic_Schema_Index $key)
 {
     // If a semantically identical key already exists, replace it.
     $match = null;
     foreach ($this->ctx->indexes as $array_index => &$index) {
         if ($key->equal_to($index)) {
             $match = $array_index;
             break;
         }
     }
     if (isset($match)) {
         unset($this->ctx->indexes[$match]);
     }
     $this->ctx->add_index($key);
 }