Continued a little:
authorRoland Haeder <roland@mxchange.org>
Sun, 7 Dec 2014 18:23:04 +0000 (19:23 +0100)
committerRoland Haeder <roland@mxchange.org>
Sun, 7 Dec 2014 18:23:04 +0000 (19:23 +0100)
- Added resolveUniversalResourceLocatorFromNodeHelper() to interface
- BaseProtocolResolver now expandes BaseHubSystem to have some setters back.
- Improved comments here and there

Signed-off-by: Roland Haeder <roland@mxchange.org>
application/hub/interfaces/resolver/class_ProtocolResolver.php
application/hub/main/class_BaseHubSystem.php
application/hub/main/resolver/protocol/class_BaseProtocolResolver.php
application/hub/main/resolver/protocol/tcp/class_TcpProtocolResolver.php
application/hub/main/source/urls/class_CrawlerUploadedListUrlSource.php
data/url_lists/demo.lst [deleted file]

index 21dbecac9af4ee5984ce176110e1699c34bf9192..84bc584c92a0b6dc8baaaddd71ac77b73aa87698 100644 (file)
@@ -22,6 +22,14 @@ OS<?php
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 interface ProtocolResolver extends FrameworkInterface {
+       /**
+        * Returns an command instance for a given NodeHelper instance or null if it
+        * was not found.
+        *
+        * @param       $nodeInstance   An instance of a NodeHelper class
+        * @return      $unlInstance    An instance of a LocateableNode class
+        */
+       function resolveUniversalResourceLocatorFromNodeHelper (NodeHelper $nodeInstance);
 }
 
 // [EOF]
index f41ac725c436f6183ff6dd90a3fb2c0dcd007d8d..58c9dc3eee63847a4802fa42dc9525350c1be535 100644 (file)
@@ -437,7 +437,7 @@ class BaseHubSystem extends BaseFrameworkSystem {
        /**
         * Setter for session id
         *
-        * @param       $sessionId              The new session id
+        * @param       $sessionId      The new session id
         * @return      void
         */
        protected final function setSessionId ($sessionId) {
@@ -447,7 +447,7 @@ class BaseHubSystem extends BaseFrameworkSystem {
        /**
         * Getter for session id
         *
-        * @return      $sessionId              Current session id
+        * @return      $sessionId      Current session id
         */
        public final function getSessionId () {
                return $this->getConfigInstance()->getConfigEntry('session_id');
index 1a8e8252408b704706bccaea2ee1a2c5073a6c29..7db28005cf1e36dfdd221bd5c2e817f9098bd2ce 100644 (file)
@@ -21,7 +21,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class BaseProtocolResolver extends BaseResolver {
+class BaseProtocolResolver extends BaseHubSystem {
        /**
         * Protected constructor
         *
index bc23f32a103c8814bb2cd0239aadd4fb5839c72e..41a1f6d2093d97ae50c91c15785126c81ec94f2f 100644 (file)
@@ -49,8 +49,8 @@ class TcpProtocolResolver extends BaseProtocolResolver implements ProtocolResolv
        }
 
        /**
-        * Returns an command instance for a given request class or null if
-        * it was not found
+        * Returns an command instance for a given NodeHelper instance or null if it
+        * was not found.
         *
         * @param       $nodeInstance   An instance of a NodeHelper class
         * @return      $unlInstance    An instance of a LocateableNode class
index 41fe3d7d7e2ea07b97b5f2b0f212ad7f6a187424..928a9e28449bbe9ac58ffe539d187aface6340e2 100644 (file)
@@ -59,9 +59,12 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
        public function processStack () {
                // Does the stack have some entries left?
                if (!$this->isUrlStackEmpty()) {
-                       // Nothing to handle here
+                       /*
+                        * Handle next entry. This method will be called very often, so need
+                        * to process more than one entry at a time.
+                        */
                        $this->processNextEntry();
-               } elseif ($this->
+               } // @TODO elseif ($this->
 
                $this->partialStub('Please implement this method.');
        }
diff --git a/data/url_lists/demo.lst b/data/url_lists/demo.lst
deleted file mode 100644 (file)
index 84b5b40..0000000
+++ /dev/null
@@ -1 +0,0 @@
-http://mxchange.org