X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fmain%2Fclasses%2Findex%2Ffile_stack%2Fclass_FileStackIndex.php;h=b1e04a96802caba90351158f71142e837b793eab;hp=5076d808a4d6c9159912a35685a407b85a08daac;hb=de1f271c2bdb43725f6671ea6588a44cf33bf091;hpb=d2ada1dfeab84d86d194efc894c7a287eebe124e diff --git a/inc/main/classes/index/file_stack/class_FileStackIndex.php b/inc/main/classes/index/file_stack/class_FileStackIndex.php index 5076d808..b1e04a96 100644 --- a/inc/main/classes/index/file_stack/class_FileStackIndex.php +++ b/inc/main/classes/index/file_stack/class_FileStackIndex.php @@ -64,7 +64,7 @@ class FileStackIndex extends BaseIndex implements IndexableStack, Registerable { */ public function addHashToIndex ($groupId, array $data) { // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,gap=%d,length=%d - CALLED!', __METHOD__, __LINE__, $groupId, $data[BaseFileStack::ARRAY_INDEX_HASH], $data[BaseFileStack::ARRAY_INDEX_GAP_POSITION], $data[BaseFileStack::ARRAY_INDEX_DATA_LENGTH])); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,gap=%d,length=%d - CALLED!', __METHOD__, __LINE__, $groupId, $data[BaseFileStack::ARRAY_INDEX_HASH], $data[BaseFileStack::ARRAY_INDEX_GAP_POSITION], $data[BaseFileStack::ARRAY_INDEX_DATA_LENGTH])); // Raw data been written to the file $rawData = sprintf('%s%s%s%s%s%s%s', @@ -78,7 +78,7 @@ class FileStackIndex extends BaseIndex implements IndexableStack, Registerable { ); // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,rawData()=%d', __METHOD__, __LINE__, $groupId, $data[BaseFileStack::ARRAY_INDEX_HASH], strlen($rawData))); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,rawData()=%d', __METHOD__, __LINE__, $groupId, $data[BaseFileStack::ARRAY_INDEX_HASH], strlen($rawData))); // Search for next free gap $gapPosition = $this->getIteratorInstance()->searchNextGap(strlen($rawData)); @@ -87,13 +87,13 @@ class FileStackIndex extends BaseIndex implements IndexableStack, Registerable { assert($gapPosition > $this->getIteratorInstance()->getHeaderSize()); // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,gapPosition=%s', __METHOD__, __LINE__, $groupId, $data[BaseFileStack::ARRAY_INDEX_HASH], $gapPosition)); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,gapPosition=%s', __METHOD__, __LINE__, $groupId, $data[BaseFileStack::ARRAY_INDEX_HASH], $gapPosition)); // Then write the data at that gap $this->getIteratorInstance()->writeData($gapPosition, $rawData); // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,rawData()=%d - EXIT!', __METHOD__, __LINE__, $groupId, $data[BaseFileStack::ARRAY_INDEX_HASH], strlen($rawData))); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] groupId=%s,hash=%s,rawData()=%d - EXIT!', __METHOD__, __LINE__, $groupId, $data[BaseFileStack::ARRAY_INDEX_HASH], strlen($rawData))); } /**