]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/discovery/package/class_PackageRecipientDiscovery.php
Package data 'recipient', 'sender' and 'content' are now replaceable
[hub.git] / application / hub / main / discovery / package / class_PackageRecipientDiscovery.php
index 45e17fa183056616cb2a04875b932d4b2a395022..b4e5f21804f6cd314d7d9de76fa4d456200fb27b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -59,7 +59,7 @@ class PackageRecipientDiscovery extends BaseHubDiscovery implements Discoverable
                $listInstance = RecipientListFactory::createRecipientListInstance();
 
                // We do some rudimentary checks but this might be a bit ugly
-               switch ($packageData['recipient']) {
+               switch ($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]) {
                        // All upper hubs, these are currently the bootstrap nodes and later on prepended list-nodes
                        case NetworkPackage::NETWORK_TARGET_UPPER_HUBS:
                                // Get all bootstrap nodes
@@ -99,7 +99,7 @@ class PackageRecipientDiscovery extends BaseHubDiscovery implements Discoverable
 
                        // This may be a direct recipient (hub's session id)
                        default:
-                               $this->partialStub('Please add code handling recipients ' . $packageData['recipient']);
+                               $this->partialStub('Please add code handling recipients ' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]);
                                break;
                } // END - switch
        }