]> git.mxchange.org Git - hub.git/commitdiff
Added missing methods to interface and BaseDht class.
authorRoland Haeder <roland@mxchange.org>
Sat, 8 Feb 2014 21:56:37 +0000 (22:56 +0100)
committerRoland Haeder <roland@mxchange.org>
Sat, 8 Feb 2014 21:56:37 +0000 (22:56 +0100)
Signed-off-by: Roland Haeder <roland@mxchange.org>
application/hub/interfaces/distributable/class_Distributable.php
application/hub/main/dht/class_BaseDht.php

index f3aadbea3d038cb4252220aaf1a938bc16bbbc46..43e7bd85d692ce4620e8b8b515d4bbd43421a31c 100644 (file)
@@ -120,6 +120,21 @@ interface Distributable extends FrameworkInterface {
         * @return      void
         */
        function initEntryPublication ();
         * @return      void
         */
        function initEntryPublication ();
+
+       /**
+        * Checks whether there are entries pending publication
+        *
+        * @return      $isPending      Whether there are entries pending publication
+        */
+       function hasEntriesPendingPublication ();
+
+       /**
+        * Publishes next entry found in stack. This method shall also update the
+        * corresponding dabase entry.
+        *
+        * @return      void
+        */
+       function publishEntry ();
 }
 
 // [EOF]
 }
 
 // [EOF]
index 9f5cb4c799cfdc03295d231fec9db6599e46d5ba..ad09de3e6a71ec2ca5c18069b797adf2a4811c2b 100644 (file)
@@ -162,6 +162,29 @@ abstract class BaseDht extends BaseHubSystem {
                        $this->getStackerInstance()->pushNamed(self::STACKER_NAME_PENDING_PUBLISHING, $current);
                } // END - while
        }
                        $this->getStackerInstance()->pushNamed(self::STACKER_NAME_PENDING_PUBLISHING, $current);
                } // END - while
        }
+
+       /**
+        * Checks whether there are entries pending publication
+        *
+        * @return      $isPending      Whether there are entries pending publication
+        */
+       public function hasEntriesPendingPublication () {
+               // Determine it if it is not empty
+               $isPending = ($this->getStackerInstance()->isStackEmpty(self::STACKER_NAME_PENDING_PUBLISHING) === FALSE);
+
+               // Return status
+               return $isPending;
+       }
+
+       /**
+        * Publishes next entry found in stack. This method shall also update the
+        * corresponding dabase entry.
+        *
+        * @return      void
+        */
+       public function publishEntry () {
+               $this->partialStub('Unimplemented method.');
+       }
 }
 
 // [EOF]
 }
 
 // [EOF]