]> git.mxchange.org Git - core.git/commitdiff
Satisfied Pointer interface, but it will throw an exception ... ;-)
authorRoland Haeder <roland@mxchange.org>
Thu, 22 May 2014 20:56:40 +0000 (22:56 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 22 May 2014 20:56:40 +0000 (22:56 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
inc/classes/main/file_directories/class_BaseFile.php
inc/classes/main/file_directories/class_BaseFileIo.php

index 8881b6a64b60cbc55e3c97c401a9cbae1fd6a1b5..7e21076d285a7940a56a74bf6a63eb6e0a2acab5 100644 (file)
@@ -51,6 +51,17 @@ class BaseFile extends BaseFrameworkSystem {
                parent::__destruct();
        }
 
+       /**
+        * Getter for the file pointer
+        *
+        * @return      $filePointer    The file pointer which shall be a valid file resource
+        * @throws      UnsupportedOperationException   If this method is called
+        */
+       public final function getPointer () {
+               self::createDebugInstance(__CLASS__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
+               throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
+       }
+
        /**
         * Setter for file name
         *
index cd07f7fbc42123c816b63a7055d2d79b42a95950..845032a0980511be1f0f1a861d91a2ce38e64d5c 100644 (file)
@@ -61,11 +61,10 @@ class BaseFileIo extends BaseFrameworkSystem {
 
        /**
         * Close a file source and set it's instance to null and the file name
-        * to empty
+        * to empty.
         *
         * @return      void
-        * @throws      NullPointerException    If the file pointer instance
-        *                                                                      is not set by setPointer()
+        * @throws      NullPointerException    If the file pointer instance is not set by setPointer()
         * @throws      InvalidResourceException        If there is being set
         */
        public function closeFile () {
@@ -96,8 +95,7 @@ class BaseFileIo extends BaseFrameworkSystem {
        /**
         * Getter for the file pointer
         *
-        * @return      $filePointer    The file pointer which shall be a valid
-        *                                                      file resource
+        * @return      $filePointer    The file pointer which shall be a valid file resource
         */
        public final function getPointer () {
                return $this->filePointer;