]> git.mxchange.org Git - core.git/blobdiff - framework/main/interfaces/template/class_CompileableTemplate.php
Continued:
[core.git] / framework / main / interfaces / template / class_CompileableTemplate.php
index 480a25af022a985fbcdfed0e7d65d78af7aabfd1..0c6636a18f7667a4fab3098b903145bd2c14d7e4 100644 (file)
@@ -4,7 +4,6 @@ namespace Org\Mxchange\CoreFramework\Template;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
-use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
 use Org\Mxchange\CoreFramework\Response\Responseable;
 
 /**
@@ -12,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 - 2020 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -37,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
@@ -46,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
@@ -56,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
@@ -66,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
@@ -90,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
@@ -99,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
@@ -107,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'
@@ -125,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
@@ -138,10 +137,9 @@ interface CompileableTemplate extends FrameworkInterface {
        /**
         * Assigns all the application data with template variables
         *
-        * @param       $applicationInstance    A manageable application instance
         * @return      void
         */
-       function assignApplicationData (ManageableApplication $applicationInstance);
+       function assignApplicationData ();
 
        /**
         * "Compiles" a variable by replacing {?var?} with it's content
@@ -150,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
@@ -159,7 +157,7 @@ interface CompileableTemplate extends FrameworkInterface {
         * @param       $newName        New name of variable
         * @return      void
         */
-       function renameVariable ($oldName, $newName);
+       function renameVariable (string $oldName, string $newName);
 
        /**
         * Renders the given XML content
@@ -168,7 +166,7 @@ interface CompileableTemplate extends FrameworkInterface {
         * @return      void
         * @throws      XmlParserException      If an XML error was found
         */
-       function renderXmlContent ($content = NULL);
+       function renderXmlContent (string $content = NULL);
 
        /**
         * Enables or disables language support
@@ -176,7 +174,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
@@ -191,7 +189,7 @@ interface CompileableTemplate extends FrameworkInterface {
         * @param       $xmlCompacting  New XML compacting setting
         * @return      void
         */
-       function enableXmlCompacting ($xmlCompacting = true);
+       function enableXmlCompacting (bool $xmlCompacting = true);
 
        /**
         * Checks whether XML compacting is enabled
@@ -206,7 +204,7 @@ interface CompileableTemplate extends FrameworkInterface {
         * @param       $uncompactedContent             The uncompacted content
         * @return      $compactedContent               The compacted content
         */
-       function compactContent ($uncompactedContent);
+       function compactContent (string $uncompactedContent);
 
        /**
         * Getter for given variable group
@@ -214,7 +212,7 @@ interface CompileableTemplate extends FrameworkInterface {
         * @param       $variableGroup  Variable group to check
         * @return      $varStack               Found variable group
         */
-       function getVarStack ($variableGroup);
+       function getVarStack (string $variableGroup);
 
        /**
         * Settter for variable group
@@ -223,7 +221,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