diff options
author | misja <misja@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-08 15:14:54 +0000 |
---|---|---|
committer | misja <misja@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-08 15:14:54 +0000 |
commit | bf79a8fe8a332546f96f00edc424377f6200344e (patch) | |
tree | 276fc4403e69b6842cb7706600067161c7d117ec /engine/lib/relationships.php | |
parent | 7a2ae99931f3ecbcfbdb740c96149e41212a2a31 (diff) | |
download | elgg-bf79a8fe8a332546f96f00edc424377f6200344e.tar.gz elgg-bf79a8fe8a332546f96f00edc424377f6200344e.tar.bz2 |
Misja Hoebe <misja@curverider.co.uk> More docstring fixes
git-svn-id: https://code.elgg.org/elgg/trunk@421 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/relationships.php')
-rw-r--r-- | engine/lib/relationships.php | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php index 4214c1522..52418e500 100644 --- a/engine/lib/relationships.php +++ b/engine/lib/relationships.php @@ -13,8 +13,10 @@ /** * Relationship class. - * @class ElggRelationship + * * @author Marcus Povey + * @package Elgg + * @subpackage Core */ class ElggRelationship implements Importable, Exportable { @@ -49,6 +51,12 @@ } } + /** + * Class member get overloading + * + * @param string $name + * @return mixed + */ protected function __get($name) { if (isset($this->attributes[$name])) return $this->attributes[$name]; @@ -56,11 +64,23 @@ return null; } + /** + * Class member set overloading + * + * @param string $name + * @param mixed $value + * @return mixed + */ protected function __set($name, $value) { $this->attributes[$name] = $value; return true; } + /** + * Save the relationship + * + * @return int the relationship id + */ public function save() { if ($this->id > 0) @@ -84,6 +104,11 @@ } + /** + * Export this relationship + * + * @return array + */ public function export() { $tmp = new stdClass; @@ -93,6 +118,14 @@ return $tmp; } + /** + * Import a relationship + * + * @param array $data + * @param int $version + * @return ElggRelationship + * @throws ImportException + */ public function import(array $data, $version = 1) { if ($version == 1) |