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=db0d582eef67f52237aead05631e04b4b7329a12;hb=de1f271c2bdb43725f6671ea6588a44cf33bf091;hpb=fe28fd87dd0c4e129cef6ee7bd4e257a3f3ba280 diff --git a/inc/main/classes/index/file_stack/class_FileStackIndex.php b/inc/main/classes/index/file_stack/class_FileStackIndex.php index db0d582e..b1e04a96 100644 --- a/inc/main/classes/index/file_stack/class_FileStackIndex.php +++ b/inc/main/classes/index/file_stack/class_FileStackIndex.php @@ -1,4 +1,10 @@ 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', @@ -72,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)); @@ -81,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))); } /** @@ -100,7 +106,5 @@ class FileStackIndex extends BaseIndex implements IndexableStack, Registerable { public function searchNextGap ($length) { $this->partialStub('length=' . $length); } -} -// [EOF] -?> +}