Example #1
0
 public function parseRoot(dom\element $el)
 {
     $file = $this->getSourceFile($el->read());
     $this->setFile($file);
     $importer = $this->getParser()->getImporter();
     $call = $importer->call('import', array((string) $this->getFile()), '\\sylma\\core\\argument');
     $this->setCall($call);
 }
Example #2
0
 protected function reflectBase(dom\element $el)
 {
     array_pop($this->aBases);
     $this->aBases[] = $el->read();
 }
Example #3
0
 protected function parseID(dom\element $el)
 {
     if ($el->isComplex()) {
         if ($el->countChildren() > 1) {
             $this->throwException(sprintf('Only one child expected in %s', $el->asToken()));
         }
         $mResult = $this->parseElement($el->getFirst());
     } else {
         $mResult = $el->read();
     }
     $this->setID($mResult);
 }
Example #4
0
 public function parseRoot(dom\element $el)
 {
     $sFile = $el->read();
     $this->setNode($el);
     return $this->getSourceFile($sFile);
 }
Example #5
0
 protected function readElement(dom\element $el)
 {
     if ($el->isComplex()) {
         $this->launchException('Cannot read complex element');
     }
     return $el->read();
 }
Example #6
0
 public function parseRoot(dom\element $el)
 {
     $file = $this->getSourceFile($el->read());
     return $this->parseFile($file);
 }
Example #7
0
 protected function reflectImportStatic(dom\element $parent, dom\element $import)
 {
     $doc = $this->getSourceFile($import->read())->getDocument();
     $this->mergeElement($parent, $doc->getRoot(), false);
     $import->replace($doc->getChildren());
     $sNamespace = static::loadDefaultNamespace($doc->getRoot());
     if (!$this->useNamespace($sNamespace)) {
         $this->setUsedNamespace($sNamespace);
     }
 }
Example #8
0
 protected function loadValue(dom\element $el)
 {
     $this->sValue = $this->parseContent($el->read());
 }