Elgg  Version 2.3
ElggPluginManifestParser.php
Go to the documentation of this file.
1 <?php
24 abstract class ElggPluginManifestParser {
30  protected $manifestObject;
31 
37  protected $manifest;
38 
44  protected $validAttributes;
45 
51  protected $caller;
52 
59  public function __construct(\ElggXMLElement $xml, $caller) {
60  $this->manifestObject = $xml;
61  $this->caller = $caller;
62  }
63 
69  public function getManifestObject() {
70  return $this->manifestObject;
71  }
72 
78  public function getManifest() {
79  return $this->manifest;
80  }
81 
88  public function getAttribute($name) {
89  if (in_array($name, $this->validAttributes) && isset($this->manifest[$name])) {
90  return $this->manifest[$name];
91  }
92 
93  return false;
94  }
95 
101  abstract public function parse();
102 }
getAttribute($name)
Return an attribute in the manifest.
if($guid==elgg_get_logged_in_user_guid()) $name
Definition: delete.php:21
parse()
Parse the XML object into an array.
getManifest()
Return the parsed manifest array.
getManifestObject()
Returns the manifest XML object.
__construct(\ElggXMLElement $xml, $caller)
Loads the manifest XML to be parsed.