33 private static $INSTANCE;
40 private $sectionObjects = [];
48 private function __construct()
52 $parserOutput = $parser->getData(self::SECTION);
58 foreach ($parserOutput as $sectionName => $sectionData) {
61 if (preg_match(
'/[^a-zA-Z0-9_]/', $sectionName)) {
62 throw new XmlException(sprintf(self::SECTION_NAME_ERROR_MSG, $sectionName));
86 throw new XmlException($exception->getMessage() .
" in Section '{$sectionName}'");
89 $this->sectionObjects[$sectionName] =
new SectionObject($sectionName, $elements);
101 if (!self::$INSTANCE) {
105 return self::$INSTANCE;
130 return $this->sectionObjects;
const SECTION_NAME_ERROR_MSG
static getObjectManager()
const ELEMENT_NAME_ERROR_MSG
if(!isset($_GET['name'])) $name