]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/template/class_BaseTemplateEngine.php
Refacuring:
[core.git] / framework / main / classes / template / class_BaseTemplateEngine.php
index 05f39746b38f8c9f62244cfa3ebc6076d0d90de3..9209305fab3e97c4e0c4c1dadbb6bb891efa4f9a 100644 (file)
@@ -6,7 +6,6 @@ namespace Org\Mxchange\CoreFramework\Template\Engine;
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
-use Org\Mxchange\CoreFramework\Handler\Stream\IoHandler;
 use Org\Mxchange\CoreFramework\Filesystem\FileNotFoundException;
 use Org\Mxchange\CoreFramework\Generic\NullPointerException;
 use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
@@ -14,6 +13,7 @@ use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Response\Responseable;
 use Org\Mxchange\CoreFramework\Stacker\Stackable;
+use Org\Mxchange\CoreFramework\Traits\Handler\Io\IoHandlerTrait;
 use Org\Mxchange\CoreFramework\Utils\String\StringUtils;
 
 // Import SPL stuff
@@ -43,17 +43,15 @@ use \SplFileInfo;
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 abstract class BaseTemplateEngine extends BaseFrameworkSystem {
+       // Load traits
+       use IoHandlerTrait;
+
        // Exception codes for the template engine
        const EXCEPTION_TEMPLATE_TYPE_IS_UNEXPECTED   = 0x110;
        const EXCEPTION_TEMPLATE_CONTAINS_INVALID_VAR = 0x111;
        const EXCEPTION_INVALID_VIEW_HELPER           = 0x112;
        const EXCEPTION_VARIABLE_IS_MISSING           = 0x113;
 
-       /**
-        * The file I/O instance for the template loader
-        */
-       private $fileIoInstance = NULL;
-
        /**
         * The local path name where all templates and sub folders for special
         * templates are stored. We will internally determine the language plus
@@ -1621,25 +1619,6 @@ abstract class BaseTemplateEngine extends BaseFrameworkSystem {
                return $this->xmlCompacting;
        }
 
-       /**
-        * Private getter for file IO instance
-        *
-        * @return      $fileIoInstance         An instance to the file I/O sub-system
-        */
-       protected final function getFileIoInstance () {
-               return $this->fileIoInstance;
-       }
-
-       /**
-        * Setter for file I/O instance
-        *
-        * @param       $fileIoInstance         An instance to the file I/O sub-system
-        * @return      void
-        */
-       public final function setFileIoInstance (IoHandler $fileIoInstance) {
-               $this->fileIoInstance = $fileIoInstance;
-       }
-
        /**
         * Setter for stacker instance
         *