some comments fixed, small fix for windows OSes and some other things fixed
authorRoland Häder <roland@mxchange.org>
Mon, 3 Mar 2008 20:25:28 +0000 (20:25 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 3 Mar 2008 20:25:28 +0000 (20:25 +0000)
inc/classes.php
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/compressor/class_Bzip2Compressor.php
inc/classes/main/compressor/class_GzipCompressor.php
inc/classes/main/compressor/class_NullCompressor.php
inc/classes/middleware/compressor/class_CompressorChannel.php
inc/config/class_FrameworkConfiguration.php
inc/selector.php
index.php

index b3d023d63f7760fb34bc0e4de8514ffc7f3cd6cc..64e2bedc5861bfe5f940ac405c9aa0b3d55b791c 100644 (file)
@@ -1,12 +1,11 @@
 <?php
 /**
 <?php
 /**
- * Loads required classes
+ * Load required framework classes first
  *
  *
- * @author             Roland Haeder <webmaster@mxchange.org>
- * @version            0.3.0
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0
  * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
  * @license            GNU GPL 3.0 or any newer version
  * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.mxchange.org
  *
  * 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
  *
  * 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
@@ -22,9 +21,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-/**
- * Lower framework classes
- */
+// Lower framework classes
 $lowerClasses = array(
        0 => "exceptions", // Exceptions
        1 => "interfaces", // Interfaces
 $lowerClasses = array(
        0 => "exceptions", // Exceptions
        1 => "interfaces", // Interfaces
index c29262f1b0f63aab74671fd441fbf3dfb43e80b2..1e536a2013a172414ec2ea65d9063178d7030757 100644 (file)
@@ -3,12 +3,12 @@
  * The simulator system class is the super class of all other classes. This
  * class handles saving of games etc.
  *
  * The simulator system class is the super class of all other classes. This
  * class handles saving of games etc.
  *
- * @author             Roland Haeder <webmaster@mxchange.org>
+ * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.3.0
  * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
  * @license            GNU GPL 3.0 or any newer version
  * @version            0.3.0
  * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.mxchange.org
- * 
+ * @link               http://www.mxchange.org
+ *
  * 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
  * 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
@@ -126,7 +126,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
        const EXCEPTION_VARIABLE_NOT_SET             = 0x02a;
        const EXCEPTION_ATTRIBUTES_ARE_MISSING       = 0x02b;
        const EXCEPTION_ARRAY_ELEMENTS_MISSING       = 0x02c;
        const EXCEPTION_VARIABLE_NOT_SET             = 0x02a;
        const EXCEPTION_ATTRIBUTES_ARE_MISSING       = 0x02b;
        const EXCEPTION_ARRAY_ELEMENTS_MISSING       = 0x02c;
-       const EXCEPTION_NOT_CONSTRUCTABLE                       = 0x02d;
 
        /**
         * In the super constructor these system classes shall be ignored or else
 
        /**
         * In the super constructor these system classes shall be ignored or else
@@ -148,7 +147,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                "GzipCompressor",                       // GZIP compressor
                "WebOutput",                            // Web output sub-system
        );
                "GzipCompressor",                       // GZIP compressor
                "WebOutput",                            // Web output sub-system
        );
-       
+
        /**
         * Private super constructor
         *
        /**
         * Private super constructor
         *
@@ -199,7 +198,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                $this->getDebugInstance()->output(sprintf("[%s::%s] Stub! Args: %s",
                        $this->__toString(),
                        $methodName,
                $this->getDebugInstance()->output(sprintf("[%s::%s] Stub! Args: %s",
                        $this->__toString(),
                        $methodName,
-                       $argsString                     
+                       $argsString
                ));
 
                // Return nothing
                ));
 
                // Return nothing
@@ -475,7 +474,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
        private final function generateIdNumber () {
                return sprintf("%s@%s",
                        $this->__toString(),
        private final function generateIdNumber () {
                return sprintf("%s@%s",
                        $this->__toString(),
-                       md5(sprintf("%s:%s:%s:%s:%s:%s", 
+                       md5(sprintf("%s:%s:%s:%s:%s:%s",
                                $this->__toString(),
                                $this->getPartDescr(),
                                time(),
                                $this->__toString(),
                                $this->getPartDescr(),
                                time(),
index 78c25714cd02a2324c849ca7eb82c8af3c386bd1..c0c475f44264dce3754bdc9027ca664212d8d122 100644 (file)
@@ -1,6 +1,25 @@
 <?php
 /**
  * BZIP2 compression and decompression class
 <?php
 /**
  * BZIP2 compression and decompression class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.3.0
+ * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.mxchange.org
+ *
+ * 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 <http://www.gnu.org/licenses/>.
  */
 class Bzip2Compressor extends BaseFrameworkSystem implements Compressor {
        /**
  */
 class Bzip2Compressor extends BaseFrameworkSystem implements Compressor {
        /**
index d3ed86a9daa660f5ea6e25ea436e2741cff016bc..0caae9f8090384fb26bd742fd3f4fc9d1e1ea126 100644 (file)
@@ -1,6 +1,25 @@
 <?php
 /**
  * GZIP compression and decompression class
 <?php
 /**
  * GZIP compression and decompression class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.3.0
+ * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.mxchange.org
+ *
+ * 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 <http://www.gnu.org/licenses/>.
  */
 class GzipCompressor extends BaseFrameworkSystem implements Compressor {
        /**
  */
 class GzipCompressor extends BaseFrameworkSystem implements Compressor {
        /**
index 4762cb86414a11ea6521d63b2360fc61b53ed7b2..56b2d5f4f8b529d763cf5782177bfc076d255b27 100644 (file)
@@ -1,6 +1,25 @@
 <?php
 /**
  * Null compression and decompression class
 <?php
 /**
  * Null compression and decompression class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.3.0
+ * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.mxchange.org
+ *
+ * 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 <http://www.gnu.org/licenses/>.
  */
 class NullCompressor extends BaseFrameworkSystem implements Compressor {
        /**
  */
 class NullCompressor extends BaseFrameworkSystem implements Compressor {
        /**
index 74d5bbce2411aff705a2379ca4f65b135186a1a3..5d5017c6e65b846b34c2ddd233bea283ae5d194e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
 <?php
 /**
- * Kompressor-Auswahl Klasse
+ * Middleware class for selecting the right compressor channel
  *
  * @author             Roland Haeder <webmaster@mxchange.org>
  * @version            0.3.0
  *
  * @author             Roland Haeder <webmaster@mxchange.org>
  * @version            0.3.0
index 4a82113f16a3caccd34ff380481a183e02d53498..a1ca42a3aead470ecf98d016c3d3044abc316759 100644 (file)
@@ -5,12 +5,12 @@
  * NOTE: We cannot put this in inc/classes/ because it would be loaded (again)
  * in the class loader. See inc/loader/class_ClassLoader.php for instance
  *
  * NOTE: We cannot put this in inc/classes/ because it would be loaded (again)
  * in the class loader. See inc/loader/class_ClassLoader.php for instance
  *
- * @see        ClassLoader
+ * @see                        ClassLoader
  * @author             Roland Haeder <webmaster@mxchange.org>
  * @version            0.3.0
  * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
  * @license            GNU GPL 3.0 or any newer version
  * @author             Roland Haeder <webmaster@mxchange.org>
  * @version            0.3.0
  * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.mxchange.org
+ * @link               http://www.mxchange.org
  * 
  * 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
  * 
  * 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
@@ -208,8 +208,11 @@ class FrameworkConfiguration {
                // Cast to string
                $path = (string) $path;
 
                // Cast to string
                $path = (string) $path;
 
+               // Replace backslashes with slashes
+               $path = str_replace("\\", "/", $path);
+
                // Is it defined or not?
                // Is it defined or not?
-               if (!is_dir($path)) {
+               if ((!is_dir($path)) || (!is_readable($path))) {
                        // Is not a valid path
                        ApplicationEntryPoint::app_die(sprintf("[%s:] Invalid path (not found) specified. Please make sure it is created.",
                                __CLASS__
                        // Is not a valid path
                        ApplicationEntryPoint::app_die(sprintf("[%s:] Invalid path (not found) specified. Please make sure it is created.",
                                __CLASS__
index ee54e0ddff4f9b37e3963d3ce8299fe792622952..23acabec7e0b0762217fb48c040c449648d9dea1 100644 (file)
@@ -6,7 +6,7 @@
  * @version            0.3.0
  * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
  * @license            GNU GPL 3.0 or any newer version
  * @version            0.3.0
  * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.mxchange.org
+ * @link               http://www.mxchange.org
  *
  * 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
  *
  * 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
index 244d01c2d2d977745de5694ce1cfc02c69f5770b..86b8c446eee1fe7a23977e4d6c4cca8afe599af1 100644 (file)
--- a/index.php
+++ b/index.php
@@ -65,7 +65,7 @@ class ApplicationEntryPoint {
                if ((class_exists($tpl)) && (is_object($lang)) && (is_object($io))) {
                        // Use the template engine for putting out (nicer look) the message
                        try {
                if ((class_exists($tpl)) && (is_object($lang)) && (is_object($io))) {
                        // Use the template engine for putting out (nicer look) the message
                        try {
-                               $eval = sprintf("$tplEngine = %s::create%s(\"%s%s\", LanguageSystem::getInstance(), FileIOHandler::getInstance());",
+                               $eval = sprintf("\$tplEngine = %s::create%s(\"%s%s\", LanguageSystem::getInstance(), FileIOHandler::getInstance());",
                                        FrameworkConfiguration::getInstance()->readConfig("tpl_engine"),
                                        FrameworkConfiguration::getInstance()->readConfig("tpl_engine"),
                                        PATH,
                                        FrameworkConfiguration::getInstance()->readConfig("tpl_engine"),
                                        FrameworkConfiguration::getInstance()->readConfig("tpl_engine"),
                                        PATH,