From: Roland Haeder Date: Mon, 19 May 2014 18:55:00 +0000 (+0200) Subject: Methods isStackFull() and isStackEmpty() needs to be overwritten, too. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=00dd4b10d1e78ce9b517a0595faa746343ca221c;p=core.git Methods isStackFull() and isStackEmpty() needs to be overwritten, too. Signed-off-by: Roland Häder --- diff --git a/inc/classes/main/stacker/file/class_BaseFileStack.php b/inc/classes/main/stacker/file/class_BaseFileStack.php index 58a41f46..879f19d0 100644 --- a/inc/classes/main/stacker/file/class_BaseFileStack.php +++ b/inc/classes/main/stacker/file/class_BaseFileStack.php @@ -518,6 +518,36 @@ class BaseFileStack extends BaseStacker { return NULL; } + /** + * Checks whether the given stack is full + * + * @param $stackerName Name of the stack + * @return $isFull Whether the stack is full + */ + protected final function isStackFull ($stackerName) { + // File-based stacks will only run full if the disk space is low. + // @TODO Please implement this, returning FALSE + $isFull = FALSE; + + // Return result + return $isFull; + } + + /** + * Checks whether the given stack is empty + * + * @param $stackerName Name of the stack + * @return $isEmpty Whether the stack is empty + * @throws NoStackerException If given stack is missing + */ + public final function isStackEmpty ($stackerName) { + // So, is the stack empty? + $isEmpty = (($this->getStackCount($stackerName)) == 0); + + // Return result + return $isEmpty; + } + /** * Initializes given stacker * @@ -527,7 +557,7 @@ class BaseFileStack extends BaseStacker { * @throws UnsupportedOperationException This method is not (and maybe never will be) supported */ public function initStack ($stackerName, $forceReInit = FALSE) { - throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getPointerInstance()), self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -537,7 +567,7 @@ class BaseFileStack extends BaseStacker { * @throws UnsupportedOperationException This method is not (and maybe never will be) supported */ public function initStacks (array $stacks, $forceReInit = FALSE) { - throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getPointerInstance()), self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -548,7 +578,7 @@ class BaseFileStack extends BaseStacker { * @throws UnsupportedOperationException This method is not (and maybe never will be) supported */ public function isStackInitialized ($stackerName) { - throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getPointerInstance()), self::EXCEPTION_UNSPPORTED_OPERATION); } /**