From dd1cef3878259d544e9853b1c0f5abca1f0d99b1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 7 Nov 2020 17:45:44 +0100 Subject: [PATCH] Continued: - BaseFrameworkSystem->dec2hex() has moved to non-monolithic StringUtils::dec2hex() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- framework/main/classes/index/class_BaseIndex.php | 3 ++- framework/main/classes/stacker/file/class_BaseFileStack.php | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/framework/main/classes/index/class_BaseIndex.php b/framework/main/classes/index/class_BaseIndex.php index 8a382a4e..c3dec50c 100644 --- a/framework/main/classes/index/class_BaseIndex.php +++ b/framework/main/classes/index/class_BaseIndex.php @@ -8,6 +8,7 @@ use Org\Mxchange\CoreFramework\Filesystem\File\BaseBinaryFile; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Iterator\Filesystem\SeekableWritableFileIterator; use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem; +use Org\Mxchange\CoreFramework\Utils\String\StringUtils; // Import SPL stuff use \SplFileInfo; @@ -143,7 +144,7 @@ abstract class BaseIndex extends BaseFrameworkSystem { chr(BaseBinaryFile::SEPARATOR_HEADER_DATA), // Total entries - str_pad($this->dec2hex($this->getIteratorInstance()->getCounter()), BaseBinaryFile::LENGTH_COUNT, '0', STR_PAD_LEFT), + str_pad(StringUtils::dec2hex($this->getIteratorInstance()->getCounter()), BaseBinaryFile::LENGTH_COUNT, '0', STR_PAD_LEFT), // Separator header<->entries chr(BaseBinaryFile::SEPARATOR_HEADER_ENTRIES) diff --git a/framework/main/classes/stacker/file/class_BaseFileStack.php b/framework/main/classes/stacker/file/class_BaseFileStack.php index 5ddc1ca0..388f33ee 100644 --- a/framework/main/classes/stacker/file/class_BaseFileStack.php +++ b/framework/main/classes/stacker/file/class_BaseFileStack.php @@ -10,6 +10,7 @@ use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Index\Indexable; use Org\Mxchange\CoreFramework\Iterator\Filesystem\SeekableWritableFileIterator; use Org\Mxchange\CoreFramework\Stacker\BaseStacker; +use Org\Mxchange\CoreFramework\Utils\String\StringUtils; // Import SPL stuff use \SplFileInfo; @@ -174,13 +175,13 @@ abstract class BaseFileStack extends BaseStacker { chr(BaseBinaryFile::SEPARATOR_HEADER_DATA), // Total entries (will be zero) and pad it to 20 chars - str_pad($this->dec2hex($this->getIteratorInstance()->getCounter()), BaseBinaryFile::LENGTH_COUNT, '0', STR_PAD_LEFT), + str_pad(StringUtils::dec2hex($this->getIteratorInstance()->getCounter()), BaseBinaryFile::LENGTH_COUNT, '0', STR_PAD_LEFT), // Separator count<->seek position chr(BaseBinaryFile::SEPARATOR_HEADER_DATA), // Position (will be zero) - str_pad($this->dec2hex($this->getIteratorInstance()->getSeekPosition(), 2), BaseBinaryFile::LENGTH_POSITION, '0', STR_PAD_LEFT), + str_pad(StringUtils::dec2hex($this->getIteratorInstance()->getSeekPosition(), 2), BaseBinaryFile::LENGTH_POSITION, '0', STR_PAD_LEFT), // Separator position<->entries chr(BaseBinaryFile::SEPARATOR_HEADER_ENTRIES) -- 2.39.5