Rewrite continued:
[core.git] / framework / main / classes / file_directories / io / class_FrameworkFileInputOutputPointer.php
index ee070c7c570d0cc8df7339147d4a7055085c7d20..6e5814f9606ee7bf137d32cdccb5c9be421aa5a2 100644 (file)
@@ -3,6 +3,7 @@
 namespace CoreFramework\Filesystem\Pointer;
 
 // Import framework stuff
+use CoreFramework\Bootstrap\FrameworkBootstrap;
 use CoreFramework\FileSystem\BaseFileIo;
 use CoreFramework\Generic\NullPointerException;
 use CoreFramework\Object\BaseFrameworkSystem;
@@ -57,10 +58,10 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP
                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 exists but cannot be read
                        throw new FileIoException($fileName, self::EXCEPTION_FILE_NOT_REACHABLE);
-               } elseif ((!BaseFrameworkSystem::isReadableFile($fileName)) && (file_exists($fileName))) {
+               } elseif ((!FrameworkBootstrap::isReadableFile($fileName)) && (file_exists($fileName))) {
                        // File exists but cannot be read
                        throw new FileReadProtectedException($fileName, self::EXCEPTION_FILE_CANNOT_BE_READ);
                } elseif ((file_exists($fileName)) && (!is_writable($fileName))) {
@@ -73,7 +74,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP
 
                // Try to open a handler
                $filePointer = fopen($fileName, 'c+b');
-               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
@@ -129,7 +130,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP
         * Write data to a file pointer
         *
         * @param       $dataStream             The data stream we shall write to the file
-        * @return      mixed                   Number of writes bytes or FALSE on error
+        * @return      mixed                   Number of writes bytes or false on error
         */
        public function writeToFile ($dataStream) {
                // Validate the pointer
@@ -144,7 +145,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP
         *
         * @param       $seekPosition   Seek position in file
         * @param       $data                   Data to be written
-        * @return      mixed                   Number of writes bytes or FALSE on error
+        * @return      mixed                   Number of writes bytes or false on error
         */
        public function writeAtPosition ($seekPosition, $data) {
                // First seek to it
@@ -239,7 +240,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP
 
        /**
         * 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