39 public function get($name)
41 if ($this->
has($name)) {
42 return $this->data[$name];
46 return $this->parent->get($name);
56 public function set($name, $value)
58 $this->data[$name] = $value;
66 public function has($name)
68 return array_key_exists($name, $this->data);
76 public function reset($name =
null)
79 $this->data = array();
81 unset($this->data[$name]);
91 public function squash($force =
false)
93 if ($this->cache !==
null && !$force) {
97 return $this->cache = array_merge($this->parent->squash($force), $this->data);
118 $this->parent = $plist;
Global exception class for HTML Purifier; any exceptions we throw are from here.
Generic property list implementation.
getParent()
Returns the parent plist.
__construct($parent=null)
setParent($plist)
Sets the parent plist.
reset($name=null)
Resets a value to the value of it's parent, usually the default.
squash($force=false)
Squashes this property list and all of its property lists into a single array, and returns the array.
$data
Internal data-structure for properties.
has($name)
Returns true if a given key exists.