]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/database/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php
Encapsulated this code (as it is a better style)
[hub.git] / application / hub / main / database / wrapper / node / class_NodeDistributedHashTableDatabaseWrapper.php
index dbf3c66c3075d639e82b25f575432afddb0295b3..f061f169d48f19e40081f340b298dda82765231f 100644 (file)
@@ -79,7 +79,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseDatabaseWrapper implem
                $dataSetInstance->setUniqueKey(self::DB_COLUMN_NODE_ID);
 
                // Get ip:port combination and "explode" it
-               $ipPort = explode(':' . $nodeInstance->getAddressPort());
+               $ipPort = $nodeInstance->getAddressPortArray();
 
                // Make sure both is valid
                assert(($ipPort[0] !== 'invalid') && ($ipPort[1] !== 'invalid'));
@@ -112,7 +112,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseDatabaseWrapper implem
                        $nodeInstance = Registry::getRegistry()->getInstance('node');
 
                        // Get ip:port combination and "explode" it
-                       $ipPort = explode(':' . $nodeInstance->getAddressPort());
+                       $ipPort = $nodeInstance->getAddressPortArray());
 
                        // Make sure both is valid
                        assert(($ipPort[0] !== 'invalid') && ($ipPort[1] !== 'invalid'));