1
0
mirror of synced 2024-12-14 23:26:04 +03:00
doctrine2/Doctrine/Association.php

39 lines
1.4 KiB
PHP
Raw Normal View History

2006-05-30 12:42:10 +04:00
<?php
require_once("Relation.php");
/**
* Doctrine_Association this class takes care of association mapping
* (= many-to-many relationships, where the relationship is handled with an additional relational table
* which holds 2 foreign keys)
*
*
* @package Doctrine ORM
* @url www.phpdoctrine.com
* @license LGPL
*/
class Doctrine_Association extends Doctrine_Relation {
/**
* @var Doctrine_Table $associationTable
*/
private $associationTable;
/**
* the constructor
* @param Doctrine_Table $table foreign factory object
* @param Doctrine_Table $associationTable factory which handles the association
* @param string $local local field name
* @param string $foreign foreign field name
* @param integer $type type of relation
* @see Doctrine_Table constants
*/
public function __construct(Doctrine_Table $table, Doctrine_Table $associationTable, $local, $foreign, $type) {
parent::__construct($table, $local, $foreign, $type);
$this->associationTable = $associationTable;
}
/**
* @return Doctrine_Table
*/
public function getAssociationFactory() {
return $this->associationTable;
}
}
?>