]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php
no longer deprecated and now imported
[core.git] / framework / main / classes / file_directories / input / text / class_FrameworkTextFileInputPointer.php
index 2b2704e28312ec2e63e24578ce128c5eedd0c8f2..1a1b2bdafc591073e9d341d9848de80d5a93ed88 100644 (file)
@@ -3,6 +3,10 @@
 namespace CoreFramework\Filesystem\Pointer\Input;
 
 // Import framework stuff
+use CoreFramework\Bootstrap\FrameworkBootstrap;
+use CoreFramework\FileSystem\BaseFileIo;
+use CoreFramework\FileSystem\FileReadProtectedException;
+use CoreFramework\Filesystem\Pointer\InputPointer;
 use CoreFramework\Generic\NullPointerException;
 use CoreFramework\Object\BaseFrameworkSystem;
 
@@ -54,20 +58,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
@@ -159,7 +163,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