X-Git-Url: https://git.mxchange.org/?p=hub.git;a=blobdiff_plain;f=application%2Fhub%2Fclasses%2Ftemplate%2Fanswer%2Fclass_;fp=application%2Fhub%2Fclasses%2Ftemplate%2Fanswer%2Fclass_;h=7aba4b38dd48cbb86bf73a58180a8ade720c44a6;hp=0000000000000000000000000000000000000000;hb=f3400989268a1994de44909e5d968cabf72de5b1;hpb=73aff29b9bc78031853b0b8c0fe0a8e04f66ac29 diff --git a/application/hub/classes/template/answer/class_ b/application/hub/classes/template/answer/class_ new file mode 100644 index 000000000..7aba4b38d --- /dev/null +++ b/application/hub/classes/template/answer/class_ @@ -0,0 +1,110 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * @todo This template engine does not make use of setTemplateType() + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class Xml???AnswerTemplateEngine extends BaseXmlAnswerTemplateEngine implements CompileableTemplate, Registerable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of the class TemplateEngine and prepares it for usage + * + * @return $templateInstance An instance of TemplateEngine + * @throws BasePathIsEmptyException If the provided $templateBasePath is empty + * @throws InvalidBasePathStringException If $templateBasePath is no string + * @throws BasePathIsNoDirectoryException If $templateBasePath is no + * directory or not found + * @throws BasePathReadProtectedException If $templateBasePath is + * read-protected + */ + public static final function createXml???TemplateEngine () { + // Get a new instance + $templateInstance = new Xml???TemplateEngine(); + + // Init template instannce + $templateInstance->initXmlTemplateEngine('PREFIX', '!!!'); + + // Return the prepared instance + return $templateInstance; + } + + /** + * Currently not used + * + * @param $resource XML parser resource (currently ignored) + * @param $characters Characters to handle + * @return void + */ + public function characterHandler ($resource, $characters) { + // Trim all spaces away + $characters = trim($characters); + + // Is this string empty? + if (empty($characters)) { + // Then skip it silently + return false; + } // END - if + + // Assign data with matching variable here + parent::assignVariable($this->getStackInstance()->getNamed('!!!'), $characters); + } + + /** + * Getter for cache file (FQFN) + * + * @return $fqfn Full-qualified file name of the menu cache + */ + public function get???CacheFqfn () { + $this->partialStub('Please implement this method.'); + } + + /** + * Starts the ||| + * + * @return void + */ + protected function start??? () { + // Push the node name on the stacker + $this->getStackInstance()->pushNamed('!!!', '|||'); + } + + /** + * Finishes the ||| + * + * @return void + */ + protected function finish??? () { + // Pop the last entry + $this->getStackInstance()->popNamed('!!!'); + } +} + +// [EOF] +?>