コード例 #1
0
 protected function _parseHtmlOptions($html)
 {
     include_once LIMB_COMMON_DIR . '/setup_HTMLSax.inc.php';
     include_once dirname(__FILE__) . '/FedexSaxHandler.class.php';
     $options = array();
     $parser = new XMLHTMLSax3();
     $handler = new FedexSaxHandler();
     $parser->setObject($handler);
     $parser->setElementHandler('open_handler', 'close_handler');
     $parser->setDataHandler('data_handler');
     $parser->setEscapeHandler('escape_handler');
     $parser->parse($html);
     return $this->_processRawOptions($handler->getOptions());
 }
コード例 #2
0
 protected function _processTemplateContent($template_contents)
 {
     include_once LIMB_DIR . '/class/template/compiler/template_compiler.inc.php';
     include_once dirname(__FILE__) . '/../../TemplateHighlightHandler.class.php';
     include_once LIMB_COMMON_DIR . '/setup_HTMLSax.inc.php';
     global $tag_dictionary;
     //fixx
     $parser = new XMLHTMLSax3();
     $handler = new TemplateHighlightHandler($tag_dictionary);
     $handler->setTemplatePathHistory($this->history);
     $parser->setObject($handler);
     $parser->setElementHandler('open_handler', 'close_handler');
     $parser->setDataHandler('data_handler');
     $parser->setEscapeHandler('escape_handler');
     $parser->parse($template_contents);
     $html = $handler->getHtml();
     return $html;
 }