]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php
Rewrite continued:
[core.git] / framework / main / classes / file_directories / input / text / class_FrameworkTextFileInputPointer.php
index 5347f34d223da5a0028bcea0b3c7669aa0761d58..024ad4e0ff3026a09b666833656a1223ade164ef 100644 (file)
@@ -3,6 +3,7 @@
 namespace CoreFramework\Filesystem\Pointer\Input;
 
 // Import framework stuff
+use CoreFramework\Bootstrap\FrameworkBootstrap;
 use CoreFramework\FileSystem\BaseFileIo;
 use CoreFramework\Filesystem\Pointer\InputPointer;
 use CoreFramework\Generic\NullPointerException;
@@ -56,20 +57,20 @@ class FrameworkTextFileInputPointer extends BaseFileIo implements InputPointer {
                if ((is_null($fileName)) || (empty($fileName))) {
                        // No filename given
                        throw new FileIsEmptyException(NULL, self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
-               } elseif (!BaseFrameworkSystem::isReachableFilePath($fileName)) {
+               } elseif (!FrameworkBootstrap::isReachableFilePath($fileName)) {
                        // File cannot be reached
                        throw new FileIoException($fileName, self::EXCEPTION_FILE_NOT_REACHABLE);
-               } elseif ((!BaseFrameworkSystem::isReadableFile($fileName)) && (!file_exists($fileName))) {
+               } elseif ((!FrameworkBootstrap::isReadableFile($fileName)) && (!file_exists($fileName))) {
                        // File does not exist!
                        throw new FileNotFoundException($fileName, self::EXCEPTION_FILE_CANNOT_BE_READ);
-               } elseif ((!BaseFrameworkSystem::isReadableFile($fileName)) && (file_exists($fileName))) {
+               } elseif ((!FrameworkBootstrap::isReadableFile($fileName)) && (file_exists($fileName))) {
                        // File cannot be read from (but exists)
                        throw new FileReadProtectedException($fileName, self::EXCEPTION_FILE_CANNOT_BE_READ);
                }
 
                // Try to open a handler
                $filePointer = fopen($fileName, 'r');
-               if ((is_null($filePointer)) || ($filePointer === FALSE)) {
+               if ((is_null($filePointer)) || ($filePointer === false)) {
                        // Something bad happend
                        throw new FileIoException($fileName, self::EXCEPTION_FILE_POINTER_INVALID);
                } // END - if
@@ -161,7 +162,7 @@ class FrameworkTextFileInputPointer extends BaseFileIo implements InputPointer {
 
        /**
         * Checks wether the current entry is valid (not at the end of the file).
-        * This method will return TRUE if an emptied (nulled) entry has been found.
+        * This method will return true if an emptied (nulled) entry has been found.
         *
         * @return      $isValid        Whether the next entry is valid
         * @throws      UnsupportedOperationException   If this method is called