This is getting off-topic, but an excerpt from WACT:
PHP Code:
class ArrayBasedDataSourceSupport extends CommonDataSourceSupport {
var $_properties = array();
function set($name, $value) {
if (isset($this->_properties[$name]) || array_key_exists($name, $this->_properties)) {
if ($this->propertyWillChange($name, $this->_properties[$name], $value)) {
$this->_properties[$name] = $value;
}
} else {
$this->writeablePropertyNotFound($name, $value);
}
}
function get($name) {
if (isset($this->_properties[$name]) || array_key_exists($name, $this->_properties)) {
return $this->_properties[$name];
} else {
return $this->readablePropertyNotFound($name);
}
}
Bookmarks