]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/package/class_NetworkPackage.php
Package class renamed, continued (sorry for lame description)
[hub.git] / application / hub / main / package / class_NetworkPackage.php
index 4f6551c27801483fe163cb35f10d8b47a891f63c..11aaeff9fd5542c208ccc7a9ab3c508db5024f5a 100644 (file)
@@ -111,6 +111,33 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Registe
                        'callback'  => $helperInstance
                ));
        }
+
+       /**
+        * Checks wether a package has been enqueued for delivery.
+        *
+        * @return      $isEnqueued             Wether a package is enqueued
+        */
+       public function isPackageEnqueued () {
+               // Check wether the stacker is not empty
+               $isEnqueued = (($this->getStackerInstance()->isStackInitialized(self::STACKER_NAME_UNDECLARED)) && (!$this->getStackerInstance()->isStackEmpty(self::STACKER_NAME_UNDECLARED)));
+
+               // Return the result
+               return $isEnqueued;
+       }
+
+       /**
+        * Delivers an enqueued package to the stated destination. If none is
+        * provided, the registered helper class is being iterated until no target
+        * is left. This allows that a single package is being delivered to multiple
+        * targets without enqueueing it for every target. If no target is provided
+        * or it can't be determined a NoTargetException is being thrown.
+        *
+        * @return      void
+        * @throws      NoTargetException       If no target can't be determined
+        */
+       public function deliverEnqueuedPackage () {
+               $this->partialStub('Please implement this method.');
+       }
 }
 
 // [EOF]