1
0
mirror of synced 2024-12-14 07:06:04 +03:00

Added setRelation and getRelations

This commit is contained in:
runa 2006-11-03 20:18:12 +00:00
parent 870ce44263
commit 33b23eda3b

View File

@ -39,7 +39,10 @@ class Doctrine_Schema_Table extends Doctrine_Schema_Object implements Countable,
'check' => '', 'check' => '',
'charset' => '', 'charset' => '',
'description' => ''); 'description' => '');
/**
* Relations this table has with others. An array of Doctrine_Schema_Relation
*/
private $relations = array();
/** /**
* *
* @return bool * @return bool
@ -78,4 +81,22 @@ class Doctrine_Schema_Table extends Doctrine_Schema_Object implements Countable,
return $this; 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;
}
} }