*/
public final static function createIndexFile (SplFileInfo $fileInfoInstance, Block $blockInstance) {
// Get a new instance
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('INDEX-FILE: fileInfoInstance=%s,blockInstance=%s - CALLED!', $fileInfoInstance, $blockInstance->__toString()));
$fileInstance = new IndexFile();
// Set block instance here for callbacks
$fileInstance->setBlockInstance($blockInstance);
+ // Expand file name with .idx
+ $indexInfoInstance = new SplFileInfo(sprintf('%s.idx', $fileInfoInstance->__toString()));
+
// Init this abstract file
- $fileInstance->initFile($fileInfoInstance);
+ $fileInstance->initFile($indexInfoInstance);
// Return the prepared instance
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('INDEX-FILE: fileInstance=%s - EXIT!', $fileInstance->__toString()));
return $fileInstance;
}
* @return $data Hash and gap position
* @throws UnsupportedOperationException If this method is called
*/
- public function writeValueToFile ($groupId, $value) {
+ public function writeValueToFile (string $groupId, $value) {
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] groupId=' . $groupId . ',value[' . gettype($value) . ']=' . print_r($value, true));
throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
}
* @return $data Gap position and length of the raw data
* @throws UnsupportedOperationException If this method is called
*/
- public function writeDataToFreeGap ($groupId, $hash, $encoded) {
+ public function writeDataToFreeGap (string $groupId, string $hash, string $encoded) {
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] groupId=' . $groupId . ',encoded()=' . strlen($encoded));
throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
}