コード例 #1
0
ファイル: Table.php プロジェクト: rouffj/Propel2
 /**
  * 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);
     }
 }