From fd71a3d55e5f2f72501f3e686937a5e67471adb3 Mon Sep 17 00:00:00 2001 From: ajshort Date: Fri, 1 Feb 2013 01:00:06 +1100 Subject: [PATCH] Consistently exposed ManyManyList information through getters. --- model/ManyManyList.php | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/model/ManyManyList.php b/model/ManyManyList.php index 27c6a2a62..ad1461399 100644 --- a/model/ManyManyList.php +++ b/model/ManyManyList.php @@ -191,9 +191,38 @@ class ManyManyList extends RelationList { } /** - * @return Array Map of field => fieldtype + * Gets the join table used for the relationship. + * + * @return string the name of the table */ - function getExtraFields() { + public function getJoinTable() { + return $this->joinTable; + } + + /** + * Gets the key used to store the ID of the local/parent object. + * + * @return string the field name + */ + public function getLocalKey() { + return $this->localKey; + } + + /** + * Gets the key used to store the ID of the foreign/child object. + * + * @return string the field name + */ + public function getForeignKey() { + return $this->foreignKey; + } + + /** + * Gets the extra fields included in the relationship. + * + * @return array a map of field names to types + */ + public function getExtraFields() { return $this->extraFields; }