From 4d5e646e386c113daa781f39b90ae4ec7ee17de9 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Thu, 22 May 2014 22:56:40 +0200 Subject: [PATCH 1/1] Satisfied Pointer interface, but it will throw an exception ... ;-) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- inc/classes/main/file_directories/class_BaseFile.php | 11 +++++++++++ .../main/file_directories/class_BaseFileIo.php | 8 +++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/inc/classes/main/file_directories/class_BaseFile.php b/inc/classes/main/file_directories/class_BaseFile.php index 8881b6a6..7e21076d 100644 --- a/inc/classes/main/file_directories/class_BaseFile.php +++ b/inc/classes/main/file_directories/class_BaseFile.php @@ -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 * diff --git a/inc/classes/main/file_directories/class_BaseFileIo.php b/inc/classes/main/file_directories/class_BaseFileIo.php index cd07f7fb..845032a0 100644 --- a/inc/classes/main/file_directories/class_BaseFileIo.php +++ b/inc/classes/main/file_directories/class_BaseFileIo.php @@ -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; -- 2.39.2