Commit 33b23eda authored by runa's avatar runa

Added setRelation and getRelations

parent 870ce442
......@@ -39,7 +39,10 @@ class Doctrine_Schema_Table extends Doctrine_Schema_Object implements Countable,
'check' => '',
'charset' => '',
'description' => '');
/**
* Relations this table has with others. An array of Doctrine_Schema_Relation
*/
private $relations = array();
/**
*
* @return bool
......@@ -78,4 +81,22 @@ class Doctrine_Schema_Table extends Doctrine_Schema_Object implements Countable,
return $this;
}
/**
* Adds a relation between a local column and a 2nd table / column
*
* @param Doctrine_Schema_Relation Relation
*
*/
public function setRelation(Doctrine_Schema_Relation $relation){
$this->relations[] = $relation;
}
/**
* Return all the relations this table has with others
*
* @return array Array of Doctrine_Schema_Relation
*/
public function getRelations(){
return $this->relations;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment