protected function loadFile(fs\file $file) { $doc = $file->getDocument(); $doc->registerNamespaces($this->getNS()); if (!$doc->isEmpty()) { if ($doc->getRoot()->getNamespace() === static::NS) { //dsp($doc->getRoot()->getNamespace()); $aTests = $this->loadDocument($doc, $file); $iDisabled = $aTests['disabled']; unset($aTests['disabled']); $aResult = array('description' => $doc->readx('self:description', $this->getNS()), '#test' => $aTests, '@disabled' => $iDisabled); } else { $aResult = array(); } } return $aResult; }
public function importTree(fs\file $file, $sType = '') { switch ($sType) { case 'argument': $content = $this->createArgumentFromString((string) $file); break; default: case 'document': $this->loadDefaultArguments(); $content = $this->create('options', array($file->getDocument(), $this->getNS())); break; } $result = $this->loadSimpleComponent('component/tree'); $result->setOptions($content); return $result; }
public function parseFile(fs\file $file) { return $this->getParser()->addSchema($file->getDocument()); }