From: Roland Häder Date: Mon, 13 Dec 2021 17:49:35 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=08578b5e2e37e31e45d24c17c01a6b8bc0abd53b;p=core.git Continued: - renamed methods to make their purpose more clear Signed-off-by: Roland Häder --- diff --git a/framework/main/classes/handler/tasks/class_TaskHandler.php b/framework/main/classes/handler/tasks/class_TaskHandler.php index ccd17aed..818ed694 100644 --- a/framework/main/classes/handler/tasks/class_TaskHandler.php +++ b/framework/main/classes/handler/tasks/class_TaskHandler.php @@ -177,7 +177,7 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask { $key = $this->getListInstance()->getIterator()->key(); // Get the hash from key - $hash = $this->getListInstance()->getHash($key); + $hash = $this->getListInstance()->getHashByIndex($key); // Update the entry $this->getListInstance()->updateCurrentEntryByHash($hash, $taskEntry); diff --git a/framework/main/classes/iterator/default/class_DefaultIterator.php b/framework/main/classes/iterator/default/class_DefaultIterator.php index c7f8e132..8fecf9b6 100644 --- a/framework/main/classes/iterator/default/class_DefaultIterator.php +++ b/framework/main/classes/iterator/default/class_DefaultIterator.php @@ -82,7 +82,7 @@ class DefaultIterator extends BaseIterator implements Iterator, Registerable { } // Now get the entry - $current = $this->getListInstance()->getEntry($this->key()); + $current = $this->getListInstance()->getEntryByIndex($this->key()); // Return it return $current; diff --git a/framework/main/classes/lists/class_BaseList.php b/framework/main/classes/lists/class_BaseList.php index 8b6fdde1..c1ac982e 100644 --- a/framework/main/classes/lists/class_BaseList.php +++ b/framework/main/classes/lists/class_BaseList.php @@ -418,7 +418,7 @@ abstract class BaseList extends BaseFrameworkSystem implements IteratorAggregate * @param $hashIndex Index holding the hash * @return $hash The hash */ - public final function getHash ($hashIndex) { + public final function getHashByIndex (int $hashIndex) { // Get it ... $hash = $this->listIndex[$hashIndex]; @@ -433,9 +433,9 @@ abstract class BaseList extends BaseFrameworkSystem implements IteratorAggregate * @return $entry Solved entry from list * @throws InvalidListHashException If the solved hash index is invalid */ - public function getEntry ($hashIndex) { + public function getEntryByIndex (int $hashIndex) { // Get the hash value - $hash = $this->getHash($hashIndex); + $hash = $this->getHashByIndex($hashIndex); // Is the hash valid? if (!$this->isHashValid($hash)) { @@ -483,7 +483,7 @@ abstract class BaseList extends BaseFrameworkSystem implements IteratorAggregate $entryIndex = $iteratorInstance->key(); // ... and the final entry which is the stored instance - $entry = $this->getEntry($entryIndex); + $entry = $this->getEntryByIndex($entryIndex); // Add it to the list //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: Adding entry ' . $entry . ' ...');