Browse Source

Recursive things are exclusively magical.

...  Magically delicious, even.
pull/536/head
Adam Vessey 10 years ago
parent
commit
f49f709bad
  1. 10
      includes/tuque_wrapper.inc

10
includes/tuque_wrapper.inc

@ -166,6 +166,10 @@ class IslandoraFedoraObject extends FedoraObject {
public function __set($name, $value) {
parent::__set($name, $value);
// Recursion only matters for magic properties... "Plain" properties cannot
// call other code in order to start recursing, and in fact we would get
// stuck looping with a "plain" property.
if ($this->propertyIsMagical($name)) {
// XXX: Due to the structure of the code, we cannot use property_exists()
// (because many of the properties are declared in the class, and the magic
// triggers due them being NULLed), nor can we use isset() (because it is
@ -178,6 +182,7 @@ class IslandoraFedoraObject extends FedoraObject {
$vars = get_object_vars($this);
}
}
}
/**
* Ingest the given datastream.
@ -430,6 +435,10 @@ class IslandoraFedoraDatastream extends FedoraDatastream {
public function __set($name, $value) {
parent::__set($name, $value);
// Recursion only matters for magic properties... "Plain" properties cannot
// call other code in order to start recursing, and in fact we would get
// stuck looping with a "plain" property.
if ($this->propertyIsMagical($name)) {
// XXX: Due to the structure of the code, we cannot use property_exists()
// (because many of the properties are declared in the class, and the magic
// triggers due them being NULLed), nor can we use isset() (because it is
@ -442,6 +451,7 @@ class IslandoraFedoraDatastream extends FedoraDatastream {
$vars = get_object_vars($this);
}
}
}
/**
* Inherits.

Loading…
Cancel
Save