]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/io/class_FrameworkFileInputPointer.php
Made lower to upper case:
[core.git] / inc / classes / main / io / class_FrameworkFileInputPointer.php
index c7a6ad178902b1bc5be94fb430c27676f95fb4db..61582a65d7014c43510186d1c1ae1c14a11b04c5 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -71,7 +71,7 @@ class FrameworkFileInputPointer extends BaseFrameworkSystem {
                // Some pre-sanity checks...
                if ((is_null($fileName)) || (empty($fileName))) {
                        // No filename given
-                       throw new FileIsEmptyException(null, self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
+                       throw new FileIsEmptyException(NULL, self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
                } elseif (!file_exists($fileName)) {
                        // File does not exist!
                        throw new FileIoException($fileName, self::EXCEPTION_FILE_NOT_FOUND);
@@ -81,8 +81,8 @@ class FrameworkFileInputPointer extends BaseFrameworkSystem {
                }
 
                // Try to open a handler
-               $filePointer = @fopen($fileName, 'rb');
-               if ((is_null($filePointer)) || ($filePointer === false)) {
+               $filePointer = fopen($fileName, 'rb');
+               if ((is_null($filePointer)) || ($filePointer === FALSE)) {
                        // Something bad happend
                        throw new FileIoException($fileName, self::EXCEPTION_FILE_POINTER_INVALID);
                } // END - if
@@ -120,28 +120,6 @@ class FrameworkFileInputPointer extends BaseFrameworkSystem {
                return fread($this->getPointer(), 1024);
        }
 
-       /**
-        * Read lines from a file pointer
-        *
-        * @return      mixed   The result of fread()
-        * @throws      NullPointerException    If the file pointer instance
-        *                                                                      is not set by setPointer()
-        * @throws      InvalidResourceException        If there is being set
-        *                                                                      an invalid file resource
-        */
-       public function readLinesFromFile () {
-               if (is_null($this->getPointer())) {
-                       // Pointer not initialized
-                       throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
-               } elseif (!is_resource($this->getPointer())) {
-                       // Pointer is not a valid resource!
-                       throw new InvalidResourceException($this, self::EXCEPTION_INVALID_DIRECTORY_POINTER);
-               }
-
-               // Read data from the file pointer and return it
-               return fgets($this->getPointer(), 1024);
-       }
-
        /**
         * Close a file source and set it's instance to null and the file name
         * to empty