Removed asserts as they seem to be to hard and returned status code instead.
authorRoland Haeder <roland@mxchange.org>
Sat, 17 May 2014 21:54:36 +0000 (23:54 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 17 May 2014 21:54:36 +0000 (23:54 +0200)
Signed-off-by: Roland H├Ąder <roland@mxchange.org>
inc/classes/interfaces/io/pointer/io/class_InputOutputPointer.php
inc/classes/interfaces/iterator/class_SeekableWritableFileIterator.php
inc/classes/interfaces/stacker/file/class_StackableFile.php
inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php
inc/classes/main/iterator/io/class_FileIoIterator.php
inc/classes/main/stacker/file/fifo/class_FiFoFileStack.php

index 8be6351..b901c1b 100644 (file)
@@ -25,7 +25,7 @@ interface InputOutputPointer extends InputPointer, OutputPointer {
        /**
         * Rewinds to the beginning of the file
         *
-        * @return      void
+        * @return      $status         Status of this operation
         */
        function rewind ();
 
@@ -34,7 +34,7 @@ interface InputOutputPointer extends InputPointer, OutputPointer {
         *
         * @param       $seekPosition   Seek position in file
         * @param       $whence                 "Seek mode" (see http://de.php.net/fseek)
-        * @return      void
+        * @return      $tatus                  Status of this operation
         */
        function seek ($seekPosition, $whence = SEEK_SET);
 
index ab64d36..1dde2c2 100644 (file)
@@ -27,7 +27,7 @@ interface SeekableWritableFileIterator extends SeekableIterator {
         * Seeks to given position
         *
         * @param       $seekPosition   Seek position in file
-        * @return      void
+        * @return      $status                 Status of this operation
         */
        function seek ($seekPosition);
 
index 0153728..9fa6c5b 100644 (file)
@@ -26,7 +26,7 @@ interface StackableFile extends Stackable {
         * Seeks to given position
         *
         * @param       $seekPosition   Seek position in file
-        * @return      void
+        * @return      $status                 Status of this operation
         */
        function seek ($seekPosition);
 
index b167fee..198c5b0 100644 (file)
@@ -121,11 +121,11 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP
        /**
         * Rewinds to the beginning of the file
         *
-        * @return      void
+        * @return      $status         Status of this operation
         */
        public function rewind () {
                // Rewind the pointer
-               assert(rewind($this->getPointer()) === 1);
+               return rewind($this->getPointer());
        }
 
        /**
@@ -133,11 +133,11 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP
         *
         * @param       $seekPosition   Seek position in file
         * @param       $whence                 "Seek mode" (see http://de.php.net/fseek)
-        * @return      void
+        * @return      $status                 Status of this operation
         */
        public function seek ($seekPosition, $whence = SEEK_SET) {
                // Move the file pointer
-               assert(fseek($this->getPointer(), $seekPosition, $whence) === 0);
+               return fseek($this->getPointer(), $seekPosition, $whence);
        }
 }
 
index f143423..af4c1b4 100644 (file)
@@ -86,22 +86,22 @@ class FileIoIterator extends BaseIterator implements SeekableWritableFileIterato
        /**
         * Rewinds to the beginning of the file
         *
-        * @return      void
+        * @return      $status         Status of this operation
         */
        public function rewind () {
                // Call pointer instance
-               $this->getPointerInstance()->rewind();
+               return $this->getPointerInstance()->rewind();
        }
 
        /**
         * Seeks to given position
         *
         * @param       $seekPosition   Seek position in file
-        * @return      void
+        * @return      $status                 Status of this operation
         */
        public function seek ($seekPosition) {
                // Call pointer instance
-               $this->getPointerInstance()->seek($seekPosition);
+               return $this->getPointerInstance()->seek($seekPosition);
        }
 
        /**
index e7774a0..1a81058 100644 (file)
@@ -89,7 +89,7 @@ class FiFoFileStack extends BaseFileStack implements StackableFile {
         * Seeks to given position
         *
         * @param       $seekPosition   Seek position in file
-        * @return      void
+        * @return      $status                 Status of this operation
         */
        public function seek ($seekPosition) {
                $this->partialStub('seekPosition=' . $seekPosition);