예제 #1
0
파일: Table.php 프로젝트: homer6/Propel
 /**
  * Adds a new Unique to the Unique list and set the
  * parent table of the column to the current table
  */
 public function addUnique($unqdata)
 {
     if ($unqdata instanceof Unique) {
         $unique = $unqdata;
         $unique->setTable($this);
         $unique->getName();
         // we call this method so that the name is created now if it doesn't already exist.
         $this->unices[] = $unique;
         return $unique;
     } else {
         $unique = new Unique($this);
         $unique->loadFromXML($unqdata);
         return $this->addUnique($unique);
     }
 }