Continued:
[core.git] / framework / main / interfaces / template / class_CompileableTemplate.php
index db9af6e18ee470b4ab208de101ad1047214cef71..eae7325888ec368a617c7af66900afc9cb103fe5 100644 (file)
@@ -11,7 +11,7 @@ use Org\Mxchange\CoreFramework\Response\Responseable;
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -36,7 +36,7 @@ interface CompileableTemplate extends FrameworkInterface {
         * @param       $value                  The value we want to store in the variable
         * @return      void
         */
-       function assignVariable ($variableName, $value);
+       function assignVariable (string $variableName, $value);
 
        /**
         * Load a specified HTML template into the engine
@@ -45,7 +45,7 @@ interface CompileableTemplate extends FrameworkInterface {
         *                                              "html" by default
         * @return      void
         */
-       function loadHtmlTemplate ($template);
+       function loadHtmlTemplate (string $template);
 
        /**
         * Load a specified code template into the engine for later compilation
@@ -55,7 +55,7 @@ interface CompileableTemplate extends FrameworkInterface {
         *                                              located in "html" by default
         * @return      void
         */
-       function loadCodeTemplate ($template);
+       function loadCodeTemplate (string $template);
 
        /**
         * Load a specified email template into the engine for later compilation
@@ -65,7 +65,7 @@ interface CompileableTemplate extends FrameworkInterface {
         *                                              located in "html" by default
         * @return      void
         */
-       function loadEmailTemplate ($template);
+       function loadEmailTemplate (string $template);
 
        /**
         * Compile all variables by inserting their respective values
@@ -89,7 +89,7 @@ interface CompileableTemplate extends FrameworkInterface {
         * @param       $value                  Value to store in variable
         * @return      void
         */
-       function addGroupVariable ($variableName, $value);
+       function addGroupVariable (string $variableName, $value);
 
        /**
         * Removes a given variable
@@ -98,7 +98,7 @@ interface CompileableTemplate extends FrameworkInterface {
         * @param       $variableGroup  Name of variable group (default: 'general')
         * @return      void
         */
-       function removeVariable ($variableName, $variableGroup = 'general');
+       function removeVariable (string $variableName, string $variableGroup = 'general');
 
        /**
         * Assign a given congfiguration variable with a value
@@ -106,7 +106,7 @@ interface CompileableTemplate extends FrameworkInterface {
         * @param       $variableName   The configuration variable we want to assign
         * @return      void
         */
-       function assignConfigVariable ($variableName);
+       function assignConfigVariable (string $variableName);
 
        /**
         * Compiles configuration place-holders in all variables. This 'walks'
@@ -124,7 +124,7 @@ interface CompileableTemplate extends FrameworkInterface {
         * @param       $variableName   Name of the variable we want to assign
         * @return      void
         */
-       function assignTemplateWithVariable ($templateName, $variableName);
+       function assignTemplateWithVariable (string $templateName, string $variableName);
 
        /**
         * Transfers the content of this template engine to a given response instance
@@ -148,7 +148,7 @@ interface CompileableTemplate extends FrameworkInterface {
         * @param       $setMatchAsCode         Sets $match if readVariable() returns empty result (default: false)
         * @return      $rawCode                        Compile code with inserted variable value
         */
-       function compileRawCode ($rawCode, $setMatchAsCode = false);
+       function compileRawCode (string $rawCode, bool $setMatchAsCode = false);
 
        /**
         * Renames a variable in code and in stack
@@ -157,16 +157,7 @@ interface CompileableTemplate extends FrameworkInterface {
         * @param       $newName        New name of variable
         * @return      void
         */
-       function renameVariable ($oldName, $newName);
-
-       /**
-        * Renders the given XML content
-        *
-        * @param       $content        Valid XML content or if not set the current loaded raw content
-        * @return      void
-        * @throws      XmlParserException      If an XML error was found
-        */
-       function renderXmlContent ($content = NULL);
+       function renameVariable (string $oldName, string $newName);
 
        /**
         * Enables or disables language support
@@ -174,7 +165,7 @@ interface CompileableTemplate extends FrameworkInterface {
         * @param       $languageSupport        New language support setting
         * @return      void
         */
-       function enableLanguageSupport ($languageSupport = true);
+       function enableLanguageSupport (bool $languageSupport = true);
 
        /**
         * Checks whether language support is enabled
@@ -183,36 +174,13 @@ interface CompileableTemplate extends FrameworkInterface {
         */
        function isLanguageSupportEnabled ();
 
-       /**
-        * Enables or disables XML compacting
-        *
-        * @param       $xmlCompacting  New XML compacting setting
-        * @return      void
-        */
-       function enableXmlCompacting ($xmlCompacting = true);
-
-       /**
-        * Checks whether XML compacting is enabled
-        *
-        * @return      $xmlCompacting  Whether XML compacting is enabled or disabled
-        */
-       function isXmlCompactingEnabled ();
-
-       /**
-        * Removes all comments, tabs and new-line charcters to compact the content
-        *
-        * @param       $uncompactedContent             The uncompacted content
-        * @return      $compactedContent               The compacted content
-        */
-       function compactContent ($uncompactedContent);
-
        /**
         * Getter for given variable group
         *
         * @param       $variableGroup  Variable group to check
         * @return      $varStack               Found variable group
         */
-       function getVarStack ($variableGroup);
+       function getVarStack (string $variableGroup);
 
        /**
         * Settter for variable group
@@ -221,7 +189,7 @@ interface CompileableTemplate extends FrameworkInterface {
         * @param       $add            Whether add this group
         * @return      void
         */
-       function setVariableGroup ($groupName, $add = true);
+       function setVariableGroup (string $groupName, bool $add = true);
 
        /**
         * Getter for template type