Ejemplo n.º 1
0
 public function importFile(fs\file $file)
 {
     $this->log("Import : " . $file->asToken());
     $doc = $this->getRoot()->importDocument($file->getDocument(), $file);
     $aResult = $this->parseChildren($doc->getChildren());
     $this->getWindow()->parse($aResult);
     //return $aResult;
 }
Ejemplo n.º 2
0
 protected function catchException(core\exception $e, fs\file $file = null)
 {
     if ($this->useLog()) {
         $this->getLogger()->addException($e->getMessage());
     }
     if ($file) {
         $e->addPath($file->asToken());
     } else {
         $e->addPath('No file defined');
     }
     if ($this->throwExceptions()) {
         throw $e;
     } else {
         $e->save(false);
     }
 }
Ejemplo n.º 3
0
 protected function readFile(fs\file $file)
 {
     $bDebug = $this->getFusion() ? $this->getFusion()->read('debug') : false;
     return "// {$file->asToken()}\n\n" . ($bDebug ? "console.log('load : {$file}');" . parent::readFile($file) : parent::readFile($file));
 }
Ejemplo n.º 4
0
 protected function catchExceptionCheck($sException, dom\element $test, core\exception $e, fs\file $file)
 {
     $bResult = false;
     if ($sException && $e instanceof $sException) {
         $bResult = true;
     } else {
         $e->addPath($file->asToken());
         $e->addPath('Test ID : ' . $test->readAttribute('name'));
         if ($sException) {
             $e->addPath(sprintf('Exception of type %s expected', $sException));
         }
         //$e->addPath($test->asString());
         $e->save(false);
     }
     return $bResult;
 }