32 const COLUMNS_KEY =
'columns';
33 const REFERENCE_KEY =
'references';
34 const ONDELETE_KEY =
'delete';
35 const ONUPDATE_KEY =
'update';
44 return ZendDbSchema_Db_Schema_Table::FOREIGNS_KEY;
52 return $this->
getTable()->getGenerator()->dropForeignKey($this);
60 return $this->
getTable()->getGenerator()->alterForeignKey($this);
68 return $this->
getTable()->getGenerator()->addForeignKey($this);
80 $table =
new ZendDbSchema_Db_Schema_Table($table);
83 if (!$table->isExist()) {
87 $this->
__set(self::REFERENCE_KEY, $table->getOriginName());
98 return $this->
__get(self::REFERENCE_KEY);
109 $this->
__set(self::COLUMNS_KEY, $columns);
121 return array_key_exists($columnName, $this->
getColumns());
133 return in_array($refColumnName, $columns);
146 $columns[$columnName] = $refColumnName;
159 $columns = $this->
__get(self::COLUMNS_KEY);
161 return is_array($columns) ? $columns : array();
174 unset($columns[$columnName]);
188 $this->
__set(self::ONDELETE_KEY, $onDelete);
199 return $this->
__get(self::ONDELETE_KEY);
211 $this->
__set(self::ONUPDATE_KEY, $onUpdate);
222 return $this->
__get(self::ONUPDATE_KEY);