manifestObject->children)) { return false; } $elements = array(); foreach ($this->manifestObject->children as $element) { $key = $element->attributes['key']; $value = $element->attributes['value']; // create arrays if multiple fields are set if (array_key_exists($key, $elements)) { if (!is_array($elements[$key])) { $orig = $elements[$key]; $elements[$key] = array($orig); } $elements[$key][] = $value; } else { $elements[$key] = $value; } } if ($elements && !array_key_exists('name', $elements)) { $elements['name'] = $this->caller->getName(); } $this->manifest = $elements; if (!$this->manifest) { return false; } return true; } /** * Return an attribute in the manifest. * * Overrides \ElggPluginManifestParser::getAttribute() because before 1.8 * there were no rules...weeeeeeeee! * * @param string $name Attribute name * @return mixed */ public function getAttribute($name) { if (isset($this->manifest[$name])) { return $this->manifest[$name]; } return false; } }