Added setRelation and getRelations
This commit is contained in:
parent
870ce44263
commit
33b23eda3b
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user