X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=framework%2Fmain%2Finterfaces%2Fblock%2Fclass_Block.php;h=9f593ecc7a23e872944eec16496d7725f35f4ffa;hb=5c227d3d4b639d9e5141bb218c414eb877250cf4;hp=882714b9cfe155bf786667ee3fc9427334c461b4;hpb=146c8b3c929a1b0ab17d6605e5ae949ac44899c1;p=core.git diff --git a/framework/main/interfaces/block/class_Block.php b/framework/main/interfaces/block/class_Block.php index 882714b9..9f593ecc 100644 --- a/framework/main/interfaces/block/class_Block.php +++ b/framework/main/interfaces/block/class_Block.php @@ -1,16 +1,16 @@ * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2020 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -49,13 +49,6 @@ interface Block extends FrameworkInterface { */ function isEndOfFileReached (); - /** - * Getter for file name - * - * @return $fileName The current file name - */ - function getFileName (); - /** * Initializes counter for valid entries, arrays for damaged entries and * an array for gap seek positions. If you call this method on your own, @@ -79,7 +72,7 @@ interface Block extends FrameworkInterface { * @param $headerSize Size of file header * @return void */ - function setHeaderSize ($headerSize); + function setHeaderSize (int $headerSize); /** * Getter for header array @@ -124,7 +117,7 @@ interface Block extends FrameworkInterface { * @param $value Value to be added to the stack * @return $data Hash and gap position */ - function writeValueToFile ($groupId, $rawData); + function writeValueToFile (string $groupId, string $rawData); /** * Writes given raw data to the file and returns a gap position and length @@ -134,7 +127,7 @@ interface Block extends FrameworkInterface { * @param $encoded Encoded value to be written to the file * @return $data Gap position and length of the raw data */ - function writeDataToFreeGap ($groupId, $hash, $encoded); + function writeDataToFreeGap (string $groupId, string $hash, string $encoded); /** * Writes data at given position @@ -144,7 +137,7 @@ interface Block extends FrameworkInterface { * @param $flushHeader Whether to flush the header (default: flush) * @return void */ - function writeData ($seekPosition, $data, $flushHeader = true); + function writeData (int $seekPosition, string $data, bool $flushHeader = true); /** * Searches for next suitable gap the given length of data can fit in @@ -153,6 +146,6 @@ interface Block extends FrameworkInterface { * @param $length Length of raw data * @return $seekPosition Found next gap's seek position */ - function searchNextGap ($length); + function searchNextGap (int $length); }