示例#1
0
 public function validate()
 {
     $sAlias = $this->getAlias(false);
     $sElement = substr($sAlias, 0, strpos($sAlias, '_'));
     $el = $this->getHandler()->getElement($sElement);
     $this->setValue(path\urlize($el->getValue()));
     return true;
 }
示例#2
0
 public function buildArgument(dom\element $arg, fs\file $file, dom\element $test)
 {
     require_once 'core/functions/Path.php';
     $sName = core\functions\path\urlize($file->getName() . '-' . $test->readAttribute('name'));
     $tmp = $this->exportDirectory->createFile($sName . '.xml');
     $doc = $this->getManager('dom')->createDocument($arg);
     $doc->saveFile($tmp, true);
     $result = $this->getManager()->load($tmp, array(), true);
     //$result->setBaseDirectory($file->getParent());
     return $result;
 }
示例#3
0
 protected function parseResult(dom\element $test, fs\file $file, array $aArguments = array())
 {
     $result = null;
     if ($document = $test->getx('self:document', array(), false)) {
         require_once 'core/functions/Path.php';
         $sName = core\functions\path\urlize($file->getName() . '-' . $test->readx('@name'));
         $cache = $this->getExportDirectory()->createFile($sName);
         $cache->saveText((string) $this->createDocument($document->getFirst()));
         $manager = $this->getManager(self::PARSER_MANAGER);
         $result = $this->buildResult($test, $manager, $cache, $aArguments);
         $this->set('result', $result);
     }
     return $result;
 }