]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/io/class_FrameworkDirectoryPointer.php
Was to noisy.
[core.git] / inc / classes / main / io / class_FrameworkDirectoryPointer.php
index 3ce6a8175b4fe4430ae45a8fe5923ae4cd9f6c68..b8cb9dfbf5ad2f75d0363f19bbbbcf8680e9dd38 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * A class for directory reading and getting its contents
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.shipsimu.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
@@ -67,21 +67,21 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem {
         * @throws      PathReadProtectedException      If the provided path name is read-protected
         * @throws      DirPointerNotOpenedException    If opendir() returns not a directory resource
         */
-       public static final function createFrameworkDirectoryPointer ($pathName, $inConstructor = false) {
+       public static final function createFrameworkDirectoryPointer ($pathName, $inConstructor = FALSE) {
                // Some pre-sanity checks...
                if (is_null($pathName)) {
                        // No pathname given
                        if ($inConstructor) {
                                return NULL;
                        } else {
-                               throw new PathIsEmptyException(null, self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
+                               throw new PathIsEmptyException(NULL, self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
                        }
                } elseif (!is_string($pathName)) {
                        // Is not a string
                        if ($inConstructor) {
                                return NULL;
                        } else {
-                               throw new InvalidPathStringException(null, self::EXCEPTION_INVALID_STRING);
+                               throw new InvalidPathStringException(NULL, self::EXCEPTION_INVALID_STRING);
                        }
                } elseif (!is_dir($pathName)) {
                        // Not a directory
@@ -140,7 +140,7 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem {
        public function readDirectoryExcept (array $except = array('.', '..')) {
                if (count($except) == 0) {
                        // No exception given, so read all data
-                       $this->debugOutput('DIRECTORY: No exceptions given, please use readRawDirectory() instead!');
+                       self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __LINE__ . ']: No exceptions given, please use readRawDirectory() instead!');
                        return $this->readRawDirectory();
                } // END - if
 
@@ -148,18 +148,18 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem {
                $rawLine = $this->readRawDirectory();
 
                // Shall we exclude directories?
-               if ((!is_null($rawLine)) && ($rawLine !== false) && (!in_array($rawLine, $except))) {
+               if ((!is_null($rawLine)) && ($rawLine !== FALSE) && (!in_array($rawLine, $except))) {
                        // Return read data
-                       //* NOISY-DEBUG: */ $this->debugOutput('DIRECTORY: rawLine[' . gettype($rawLine) . ']=' . $rawLine);
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __LINE__ . ']: rawLine[' . gettype($rawLine) . ']=' . $rawLine);
                        return $rawLine;
-               } elseif ((!is_null($rawLine)) && ($rawLine !== false)) {
+               } elseif ((!is_null($rawLine)) && ($rawLine !== FALSE)) {
                        // Exclude this part
-                       //* NOISY-DEBUG: */ $this->debugOutput('DIRECTORY: rawline[' . gettype($rawLine) . ']=' . $rawLine . ' - Recursive call!');
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __LINE__ . ']: rawline[' . gettype($rawLine) . ']=' . $rawLine . ' - Recursive call!');
                        return $this->readDirectoryExcept($except);
                }
 
                // End pointer reached
-               //* NOISY-DEBUG: */ $this->debugOutput('DIRECTORY: Returning NULL!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __LINE__ . ']: Returning NULL!');
                return NULL;
        }