aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggRelationship.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes/ElggRelationship.php')
-rw-r--r--engine/classes/ElggRelationship.php139
1 files changed, 2 insertions, 137 deletions
diff --git a/engine/classes/ElggRelationship.php b/engine/classes/ElggRelationship.php
index c072e1cc6..e2b0e4e13 100644
--- a/engine/classes/ElggRelationship.php
+++ b/engine/classes/ElggRelationship.php
@@ -8,15 +8,8 @@
class ElggRelationship extends ElggData implements
Importable,
Exportable,
- Loggable, // Can events related to this object class be logged
- Iterator, // Override foreach behaviour
- ArrayAccess // Override for array access
- {
- /**
- * This contains the site's main properties (id, etc)
- * @var array
- */
- protected $attributes;
+ Loggable // Can events related to this object class be logged
+{
/**
* Construct a new site object, optionally from a given id value or row.
@@ -247,132 +240,4 @@ class ElggRelationship extends ElggData implements
return $this->relationship;
}
- // ITERATOR INTERFACE //////////////////////////////////////////////////////////////
- /*
- * This lets an entity's attributes be displayed using foreach as a normal array.
- * Example: http://www.sitepoint.com/print/php5-standard-library
- */
-
- private $valid = FALSE;
-
- /**
- * Iterator interface
- *
- * @see Iterator::rewind()
- *
- * @return void
- */
- function rewind() {
- $this->valid = (FALSE !== reset($this->attributes));
- }
-
- /**
- * Iterator interface
- *
- * @see Iterator::current()
- *
- * @return void
- */
- function current() {
- return current($this->attributes);
- }
-
- /**
- * Iterator interface
- *
- * @see Iterator::key()
- *
- * @return void
- */
- function key() {
- return key($this->attributes);
- }
-
- /**
- * Iterator interface
- *
- * @see Iterator::next()
- *
- * @return void
- */
- function next() {
- $this->valid = (FALSE !== next($this->attributes));
- }
-
-
- /**
- * Iterator interface
- *
- * @see Iterator::valid()
- *
- * @return void
- */
- function valid() {
- return $this->valid;
- }
-
- // ARRAY ACCESS INTERFACE //////////////////////////////////////////////////////////
- /*
- * This lets an entity's attributes be accessed like an associative array.
- * Example: http://www.sitepoint.com/print/php5-standard-library
- */
-
- /**
- * Array access interface
- *
- * @see ArrayAccess::offsetSet()
- *
- * @param mixed $key Name
- * @param mixed $value Value
- *
- * @return void
- */
- function offsetSet($key, $value) {
- if (array_key_exists($key, $this->attributes)) {
- $this->attributes[$key] = $value;
- }
- }
-
- /**
- * Array access interface
- *
- * @see ArrayAccess::offsetGet()
- *
- * @param mixed $key Name
- *
- * @return void
- */
- function offsetGet($key) {
- if (array_key_exists($key, $this->attributes)) {
- return $this->attributes[$key];
- }
- }
-
- /**
- * Array access interface
- *
- * @see ArrayAccess::offsetUnset()
- *
- * @param mixed $key Name
- *
- * @return void
- */
- function offsetUnset($key) {
- if (array_key_exists($key, $this->attributes)) {
- $this->attributes[$key] = ""; // Full unsetting is dangerious for our objects
- }
- }
-
- /**
- * Array access interface
- *
- * @see ArrayAccess::offsetExists()
- *
- * @param int $offset Offset
- *
- * @return int
- */
- function offsetExists($offset) {
- return array_key_exists($offset, $this->attributes);
- }
} \ No newline at end of file