From b306775c8bca74cc966be6e31cc13ca688573193 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 17 May 2014 23:28:07 +0200 Subject: [PATCH] Renamed getPosition() -> getSeekPosition(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- inc/classes/interfaces/io/class_Streamable.php | 2 +- .../interfaces/io/pointer/io/class_InputOutputPointer.php | 7 +++++++ inc/classes/main/debug/class_DebugConsoleOutput.php | 2 +- inc/classes/main/debug/class_DebugErrorLogOutput.php | 2 +- inc/classes/main/debug/class_DebugWebOutput.php | 2 +- inc/classes/main/file_directories/class_BaseFileIo.php | 6 +++--- .../main/file_directories/io_stream/class_FileIoStream.php | 2 +- inc/classes/middleware/io/class_FileIoHandler.php | 2 +- 8 files changed, 16 insertions(+), 9 deletions(-) diff --git a/inc/classes/interfaces/io/class_Streamable.php b/inc/classes/interfaces/io/class_Streamable.php index 7503dba4..3f01db57 100644 --- a/inc/classes/interfaces/io/class_Streamable.php +++ b/inc/classes/interfaces/io/class_Streamable.php @@ -27,7 +27,7 @@ interface Streamable extends FrameworkInterface { * * @return $seekPosition Current seek position */ - function getPosition (); + function getSeekPosition (); /** * Seek to given offset (default) or other possibilities as fseek() gives. diff --git a/inc/classes/interfaces/io/pointer/io/class_InputOutputPointer.php b/inc/classes/interfaces/io/pointer/io/class_InputOutputPointer.php index 529dbe6f..8be63510 100644 --- a/inc/classes/interfaces/io/pointer/io/class_InputOutputPointer.php +++ b/inc/classes/interfaces/io/pointer/io/class_InputOutputPointer.php @@ -37,6 +37,13 @@ interface InputOutputPointer extends InputPointer, OutputPointer { * @return void */ function seek ($seekPosition, $whence = SEEK_SET); + + /** + * "Getter" for seek position + * + * @return $seekPosition Seek position + */ + function getSeekPosition (); } // [EOF] diff --git a/inc/classes/main/debug/class_DebugConsoleOutput.php b/inc/classes/main/debug/class_DebugConsoleOutput.php index f915af5e..a4e07bbe 100644 --- a/inc/classes/main/debug/class_DebugConsoleOutput.php +++ b/inc/classes/main/debug/class_DebugConsoleOutput.php @@ -104,7 +104,7 @@ class DebugConsoleOutput extends BaseFrameworkSystem implements Debugger, Output * @return $seekPosition Current seek position * @throws UnsupportedOperationException If this method is called */ - public function getPosition () { + public function getSeekPosition () { throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); } diff --git a/inc/classes/main/debug/class_DebugErrorLogOutput.php b/inc/classes/main/debug/class_DebugErrorLogOutput.php index 3289574a..74ea9285 100644 --- a/inc/classes/main/debug/class_DebugErrorLogOutput.php +++ b/inc/classes/main/debug/class_DebugErrorLogOutput.php @@ -101,7 +101,7 @@ class DebugErrorLogOutput extends BaseFrameworkSystem implements Debugger, Outpu * @return $seekPosition Current seek position * @throws UnsupportedOperationException If this method is called */ - public function getPosition () { + public function getSeekPosition () { throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); } diff --git a/inc/classes/main/debug/class_DebugWebOutput.php b/inc/classes/main/debug/class_DebugWebOutput.php index 7b992594..3795d761 100644 --- a/inc/classes/main/debug/class_DebugWebOutput.php +++ b/inc/classes/main/debug/class_DebugWebOutput.php @@ -90,7 +90,7 @@ class DebugWebOutput extends BaseFrameworkSystem implements Debugger, OutputStre * @return $seekPosition Current seek position * @throws UnsupportedOperationException If this method is called */ - public function getPosition () { + public function getSeekPosition () { throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); } diff --git a/inc/classes/main/file_directories/class_BaseFileIo.php b/inc/classes/main/file_directories/class_BaseFileIo.php index 8cc8f60b..b3b676dd 100644 --- a/inc/classes/main/file_directories/class_BaseFileIo.php +++ b/inc/classes/main/file_directories/class_BaseFileIo.php @@ -128,7 +128,7 @@ class BaseFileIo extends BaseFrameworkSystem { * * @return $seekPosition Current seek position */ - public final function getPosition () { + public final function getSeekPosition () { return ftell($this->getPointer()); } @@ -154,13 +154,13 @@ class BaseFileIo extends BaseFrameworkSystem { */ public function size () { // Get current seek position - $seekPosition = $this->getPosition(); + $seekPosition = $this->getSeekPosition(); // Seek to end $this->seek(0, SEEK_END); // Get position again (which is the end of the file) - $size = $this->getPosition(); + $size = $this->getSeekPosition(); // Reset seek position to old $this->seek($seekPosition); diff --git a/inc/classes/main/file_directories/io_stream/class_FileIoStream.php b/inc/classes/main/file_directories/io_stream/class_FileIoStream.php index ed875ee2..bf0a3c2d 100644 --- a/inc/classes/main/file_directories/io_stream/class_FileIoStream.php +++ b/inc/classes/main/file_directories/io_stream/class_FileIoStream.php @@ -269,7 +269,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil * @return $seekPosition Current seek position * @todo 0% done */ - public function getPosition () { + public function getSeekPosition () { $this->partialStub(); } diff --git a/inc/classes/middleware/io/class_FileIoHandler.php b/inc/classes/middleware/io/class_FileIoHandler.php index 1ac1fc34..2c6ae12c 100644 --- a/inc/classes/middleware/io/class_FileIoHandler.php +++ b/inc/classes/middleware/io/class_FileIoHandler.php @@ -173,7 +173,7 @@ class FileIoHandler extends BaseMiddleware implements IoHandler { * @return $seekPosition Current seek position * @todo 0% done */ - public function getPosition () { + public function getSeekPosition () { $this->partialStub(); } -- 2.39.5