Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 public function parseFile(fs\file $file)
 {
     return $this->getParser()->addSchema($file->getDocument());
 }