Fixed a typo, added an assert()
authorRoland Häder <roland@mxchange.org>
Sat, 24 Mar 2012 08:27:37 +0000 (08:27 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 24 Mar 2012 08:27:37 +0000 (08:27 +0000)
47 files changed:
application/hub/interfaces/chat/class_Chatter.php
application/hub/interfaces/cruncher/class_CruncherHelper.php
application/hub/interfaces/handler/network/class_Networkable.php
application/hub/interfaces/handler/task/class_HandleableTask.php
application/hub/interfaces/listener/class_Listenable.php
application/hub/interfaces/lists/class_Listable.php
application/hub/interfaces/lookup/peer_states/class_LookupablePeerState.php
application/hub/interfaces/package/class_Deliverable.php
application/hub/interfaces/package/class_Receivable.php
application/hub/interfaces/tags/class_Tagable.php
application/hub/main/chat/class_BaseNodeChat.php
application/hub/main/cruncher/class_BaseHubCruncher.php
application/hub/main/database/wrapper/states/class_PeerStateLookupDatabaseWrapper.php
application/hub/main/discovery/socket/class_PackageSocketDiscovery.php
application/hub/main/handler/chunks/class_ChunkHandler.php
application/hub/main/handler/network/class_BaseRawDataHandler.php
application/hub/main/handler/tasks/class_TaskHandler.php
application/hub/main/helper/connection/class_BaseConnectionHelper.php
application/hub/main/iterator/hub/class_HubPingIterator.php
application/hub/main/iterator/network/class_NetworkListenIterator.php
application/hub/main/iterator/pool/class_DefaultIterator.php
application/hub/main/iterator/pool/handler/class_HandlerPoolIterator.php
application/hub/main/iterator/pool/monitor/class_MonitorPoolIterator.php
application/hub/main/iterator/pool/shutdown/class_ShutdownPoolIterator.php
application/hub/main/iterator/pool/tasks/class_TaskPoolIterator.php
application/hub/main/iterator/producer/keys/class_TestUnitKeyProducerIterator.php
application/hub/main/listener/class_BaseListener.php
application/hub/main/listener/tcp/class_TcpListener.php
application/hub/main/listener/tcp/decorators/class_ClientTcpListenerDecorator.php
application/hub/main/listener/tcp/decorators/class_HubTcpListenerDecorator.php
application/hub/main/listener/udp/class_UdpListener.php
application/hub/main/listener/udp/decorators/class_ClientUdpListenerDecorator.php
application/hub/main/listener/udp/decorators/class_HubUdpListenerDecorator.php
application/hub/main/lists/class_BaseList.php
application/hub/main/nodes/class_BaseHubNode.php
application/hub/main/package/class_NetworkPackage.php
application/hub/main/package/fragmenter/class_PackageFragmenter.php
application/hub/main/producer/class_BaseProducer.php
application/hub/main/registry/connection/class_ConnectionRegistry.php
application/hub/main/registry/socket/class_SocketRegistry.php
application/hub/main/resolver/state/class_BaseStateResolver.php
application/hub/main/states/cruncher/class_BaseCruncherState.php
application/hub/main/states/node/class_BaseNodeState.php
application/hub/main/states/peer/class_BasePeerState.php
application/hub/main/statistics/connection/class_ConnectionStatisticsHelper.php
application/hub/main/tags/package/class_PackageTags.php
index.php

index ee00bc1d80384eecb084331475de94c5e0ff4ff1..80d65a0590d1ea0dcbed29d58de93540144f59dc 100644 (file)
@@ -58,9 +58,9 @@ interface Chatter extends FrameworkInterface {
        function enableIsActive ($isActive = true);
 
        /**
-        * Determines wether the chatter is active
+        * Determines whether the chatter is active
         *
-        * @return      $isActive       Wether the chatter is active
+        * @return      $isActive       Whether the chatter is active
         */
        function isActive ();
 }
index b5fafe4f7703f9ff636f2dc9f7f4109b45280dbf..9bd847e290984b8e2f535c8820aadf7856929e4e 100644 (file)
@@ -67,9 +67,9 @@ interface CruncherHelper extends FrameworkInterface {
        function enableIsActive ($isActive = true);
 
        /**
-        * Determines wether the cruncher is active
+        * Determines whether the cruncher is active
         *
-        * @return      $isActive       Wether the cruncher is active
+        * @return      $isActive       Whether the cruncher is active
         */
        function isActive ();
 
index adea6832e9e3b82eb762c3afe8069decefffbb20..bb786188ed5d815c18e455b08d447fdf20a2e313 100644 (file)
@@ -33,9 +33,9 @@ interface Networkable extends Handleable {
        function processRawDataFromResource ($resource);
 
        /**
-        * Checks wether decoded data is pending for further processing.
+        * Checks whether decoded data is pending for further processing.
         *
-        * @return      $isPending      Wether decoded data is pending
+        * @return      $isPending      Whether decoded data is pending
         */
        function isDecodedDataPending ();
 
index 3fb432dd0c9d692509fbe97bc96f5f0169aedba4..38600ddec2f6377341732098e88ac89e5484d266 100644 (file)
@@ -33,9 +33,9 @@ interface HandleableTask extends Handleable {
        function registerTask ($taskName, Visitable $taskInstance);
 
        /**
-        * Checks wether tasks are left including idle task.
+        * Checks whether tasks are left including idle task.
         *
-        * @return      $tasksLeft      Wether there are tasks left to handle
+        * @return      $tasksLeft      Whether there are tasks left to handle
         */
        function hasTasksLeft ();
 
index 05782bb3a7bd8e4ad46fddd000eb3ed8d92216e7..f1eb6f1634dd40e33b419f10cd1b138ff8fed84d 100644 (file)
@@ -37,10 +37,10 @@ interface Listenable extends ProtocolHandler {
        function doListen();
 
        /**
-        * Checks wether the listener would accept the given package data array
+        * Checks whether the listener would accept the given package data array
         *
         * @param       $packageData    Raw package data
-        * @return      $accepts                Wether this listener does accept
+        * @return      $accepts                Whether this listener does accept
         */
        function ifListenerAcceptsPackageData (array $packageData);
 
index 0ad651960066aeef3b28d70dd747effbfd9c5696..39ae1339803af4ed8d9db93094f7a90e3fe43401 100644 (file)
  */
 interface Listable extends FrameworkInterface, IteratorAggregate {
        /**
-        * Checks wether the given group is set
+        * Checks whether the given group is set
         *
         * @param       $groupName      Group to check if found in list
-        * @return      $isset          Wether the group is valid
+        * @return      $isset          Whether the group is valid
         */
        function isGroupSet ($groupName);
 
index 5adc94daebec5be0325a9f2cbd57e0d989140ab7..cd30a6dc3873dbd8cf949abcea97f9c79a877354 100644 (file)
  */
 interface LookupablePeerState extends Lookupable {
        /**
-        * Checks wether given 'sender' is a new peer
+        * Checks whether given 'sender' is a new peer
         *
         * @param       $packageData    Raw package data
-        * @return      $isNewPeer              Wether 'sender' is a new peer to this node
+        * @return      $isNewPeer              Whether 'sender' is a new peer to this node
         */
        function isSenderNewPeer (array $packageData);
 
@@ -57,12 +57,12 @@ interface LookupablePeerState extends Lookupable {
        function purgeOldEntriesBySocketResource ($socketResource);
 
        /**
-        * Checks wether a given peer state (in helper instance) is same as stored
+        * Checks whether a given peer state (in helper instance) is same as stored
         * in database compared with the one from $helperInstance.
         *
         * @param       $helperInstance                 An instance of a ConnectionHelper class
         * @param       $packageData                    Valid package data array
-        * @return      $isSamePeerState                Wether the peer's state is the same
+        * @return      $isSamePeerState                Whether the peer's state is the same
         */
        function isSamePeerState (ConnectionHelper $helperInstance, array $packageData);
 }
index 6da180133f8c0648beb0ffa4b3975b8ec60096da..d38f4504cf2dcd54202fe48272a572c1db494d2a 100644 (file)
@@ -33,23 +33,23 @@ interface Deliverable extends FrameworkInterface {
        function enqueueRawDataFromTemplate (HelpableHub $helperInstance, NodeHelper $nodeInstance);
 
        /**
-        * Checks wether a package has been enqueued for delivery.
+        * Checks whether a package has been enqueued for delivery.
         *
-        * @return      $isEnqueued             Wether a package is enqueued
+        * @return      $isEnqueued             Whether a package is enqueued
         */
        function isPackageEnqueued ();
 
        /**
-        * Checks wether a package has been declared
+        * Checks whether a package has been declared
         *
-        * @return      $isDeclared             Wether a package is declared
+        * @return      $isDeclared             Whether a package is declared
         */
        function isPackageDeclared ();
 
        /**
-        * Checks wether a package should be sent out
+        * Checks whether a package should be sent out
         *
-        * @return      $isWaitingDelivery      Wether a package is waiting for delivery
+        * @return      $isWaitingDelivery      Whether a package is waiting for delivery
         */
        function isPackageWaitingForDelivery ();
 
index adc15b112ada19f529104469466253a74f073ae0..b6034b048690c812a0427c19b2e02c7204810a8d 100644 (file)
  */
 interface Receivable extends FrameworkInterface {
        /**
-        * Checks wether new raw data from the socket has arrived
+        * Checks whether new raw data from the socket has arrived
         *
         * @param       $poolInstance   An instance of a PoolableListener class
-        * @return      $hasArrived             Wether raw package data has arrived at a socket
+        * @return      $hasArrived             Whether raw package data has arrived at a socket
         */
        function isNewRawDataPending (PoolableListener $poolInstance);
 
@@ -40,9 +40,9 @@ interface Receivable extends FrameworkInterface {
        function handleIncomingDecodedData ();
 
        /**
-        * Checks wether incoming decoded data is handled.
+        * Checks whether incoming decoded data is handled.
         *
-        * @return      $isHandled      Wether incoming decoded data is handled
+        * @return      $isHandled      Whether incoming decoded data is handled
         */
        function isIncomingDecodedDataHandled ();
 
@@ -55,9 +55,9 @@ interface Receivable extends FrameworkInterface {
        function assembleDecodedDataToPackage ();
 
        /**
-        * Checks wether a new package has arrived
+        * Checks whether a new package has arrived
         *
-        * @return      $hasArrived             Wether a new package has arrived for processing
+        * @return      $hasArrived             Whether a new package has arrived for processing
         */
        function isNewPackageArrived ();
 
index 9fd39c39c87bee2329fe0ba2e4e8ab719588e6db..181c4c87bc6c7834240d594b149adf2106d8de2e 100644 (file)
@@ -31,11 +31,11 @@ interface Tagable extends FrameworkInterface {
        function chooseProtocolFromPackageData (array $packageData);
 
        /**
-        * Checks wether the given package data is accepted by the listener
+        * Checks whether the given package data is accepted by the listener
         *
         * @param       $packageData            Raw package data
         * @param       $listenerInstance       A Listenable instance
-        * @return      $accepts                        Wether it is accepted
+        * @return      $accepts                        Whether it is accepted
         */
        function ifPackageDataIsAcceptedByListener (array $packageData, Listenable $listenerInstance);
 }
index 99d47ba0bea53700d7349be769ff84dcd6eb7f8b..7e8f2a26ab9b58a896082c28ab916ca4088f5967 100644 (file)
@@ -23,7 +23,7 @@
  */
 class BaseNodeChat extends BaseHubSystem {
        /**
-        * Wether this Chatter is active
+        * Whether this Chatter is active
         */
        private $isActive = false;
 
@@ -49,9 +49,9 @@ class BaseNodeChat extends BaseHubSystem {
        }
 
        /**
-        * Determines wether the chatter is active
+        * Determines whether the chatter is active
         *
-        * @return      $isActive       Wether the chatter is active
+        * @return      $isActive       Whether the chatter is active
         */
        public final function isActive () {
                return $this->isActive;
index d45ca163292f9f9301320d63acd938e4d4e9f6fb..3607588edd270f1a748c41c1529bf366665d1b51 100644 (file)
@@ -81,10 +81,10 @@ abstract class BaseHubCruncher extends BaseHubSystem implements Updateable {
        }
 
        /**
-        * Checks wether the in-buffer queue is filled by comparing it's current
+        * Checks whether the in-buffer queue is filled by comparing it's current
         * amount of entries against a threshold.
         *
-        * @return      $isFilled       Wether the in-buffer is filled
+        * @return      $isFilled       Whether the in-buffer is filled
         */
        protected function isInBufferQueueFilled () {
                // Determine it
@@ -126,9 +126,9 @@ abstract class BaseHubCruncher extends BaseHubSystem implements Updateable {
        }
 
        /**
-        * Determines wether the cruncher is active
+        * Determines whether the cruncher is active
         *
-        * @return      $isActive       Wether the cruncher is active
+        * @return      $isActive       Whether the cruncher is active
         */
        public final function isActive () {
                return $this->isActive;
index 4ffca6783a50fd26c8364d0b3e1aac9f299f528a..f702002389e3fba7bcd0e546388f81740d7813d6 100644 (file)
@@ -82,11 +82,11 @@ class PeerStateLookupDatabaseWrapper extends BaseDatabaseWrapper implements Look
        }
 
        /**
-        * Checks wether given 'sender' is a new peer
+        * Checks whether given 'sender' is a new peer
         *
         * @param       $packageData            Raw package data
         * @param       $dataSetInstance        An optional instance of a StoreableCriteria class
-        * @return      $isNewPeer                      Wether 'sender' is a new peer to this peer
+        * @return      $isNewPeer                      Whether 'sender' is a new peer to this peer
         */
        public function isSenderNewPeer (array $packageData, StoreableCriteria $dataSetInstance = NULL) {
                // Debug message
@@ -233,12 +233,12 @@ class PeerStateLookupDatabaseWrapper extends BaseDatabaseWrapper implements Look
        }
 
        /**
-        * Checks wether a given peer state (in helper instance) is same as stored
+        * Checks whether a given peer state (in helper instance) is same as stored
         * in database compared with the one from $helperInstance.
         *
         * @param       $helperInstance                 An instance of a ConnectionHelper class
         * @param       $packageData                    Valid package data array
-        * @return      $isSamePeerState                Wether the peer's state is the same
+        * @return      $isSamePeerState                Whether the peer's state is the same
         */
        public function isSamePeerState (ConnectionHelper $helperInstance, array $packageData) {
                // Debug message
index d08dbb3f232352d31828ee1c8256e4b040f60620..d48b5a5e96de156677e33f02574fd9c020e4b7e8 100644 (file)
@@ -66,7 +66,7 @@ class PackageSocketDiscovery extends BaseHubDiscovery implements DiscoverableSoc
                $listenerInstance = NULL;
 
                /*
-                * Now we need to choose again. It is wether we are speaking with a hub
+                * Now we need to choose again. It is whether we are speaking with a hub
                 * or with a client. So just handle it over to all listeners in this
                 * pool.
                 */
index 2887610b4a8734c93559b29cfb0ac9c10dceb542..a0d0bfcacaadfc55fc75d2a2b5e4e551094b958a 100644 (file)
@@ -241,9 +241,8 @@ class ChunkHandler extends BaseHandler implements HandleableChunks, Registerable
                 * collisions) the content is the same as the sender sends it to this
                 * peer.
                 *
-                * And also the serial number is valid (basicly) at this point.
-                *
-                * Now the chunk can be added to the final array
+                * And also the serial number is valid (basicly) at this point. Now the
+                * chunk can be added to the final array.
                 */
                $this->addChunkToFinalArray($chunkSplits);
 
@@ -271,7 +270,7 @@ class ChunkHandler extends BaseHandler implements HandleableChunks, Registerable
         * Assembles all chunks (except EOP and "hash chunk") back together to the original package data.
         *
         * This is done by the following steps:
-        *
+*
         * 1) Sort the final array with ksort(). This will bring the "hash
         *    chunk" up to the last array index and the EOP chunk to the
         *    pre-last array index
@@ -283,6 +282,9 @@ class ChunkHandler extends BaseHandler implements HandleableChunks, Registerable
         * @return      void
         */
        public function assembleChunksFromFinalArray () {
+               // Make sure the final array is really completed
+               assert($this->ifUnassembledChunksAvailable());
+
                $this->partialStub('Please implement this method.');
        }
 }
index f35d7d52b6df67b30706092d43f39a63c0f43746..ee748f76f5c8ff94284155f3a795adc60477516e 100644 (file)
@@ -115,9 +115,9 @@ class BaseRawDataHandler extends BaseHandler {
        }
 
        /**
-        * Checks wether decoded data is pending for further processing.
+        * Checks whether decoded data is pending for further processing.
         *
-        * @return      $isPending      Wether decoded data is pending
+        * @return      $isPending      Whether decoded data is pending
         */
        public function isDecodedDataPending () {
                // Does the stacker have some entries (not empty)?
@@ -141,11 +141,11 @@ class BaseRawDataHandler extends BaseHandler {
        }
 
        /**
-        * Checks wether the 'recipient' field matches our own address:port
+        * Checks whether the 'recipient' field matches our own address:port
         * combination.
         *
         * @param       $packageData    Raw package data
-        * @return      $matches                Wether it matches
+        * @return      $matches                Whether it matches
         * @todo        This method will be moved to a better place
         */
        protected function ifRecipientMatchesOwnAddress (array $packageData) {
index c936419f8d2fe24ad35790d716c3532d19a8af6d..b413ab7bab9c20e4bab2f86fd1ea208a0bb7224b 100644 (file)
@@ -187,11 +187,11 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
                $taskEntry = array(
                        // Identifier for the generateHash() method
                        'id'                  => $taskName,
-                       // Wether the task is started
+                       // Whether the task is started
                        'task_started'        => false,
-                       // Wether the task is paused (not yet implemented)
+                       // Whether the task is paused (not yet implemented)
                        'task_paused'         => false,
-                       // Wether the task can be paused (not yet implemented)
+                       // Whether the task can be paused (not yet implemented)
                        'task_pauseable'      => true,
                        // Timestamp of registration
                        'task_registered'     => $this->getMilliTime(),
@@ -222,9 +222,9 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
        }
 
        /**
-        * Checks wether tasks are left including idle task
+        * Checks whether tasks are left including idle task
         *
-        * @return      $tasksLeft      Wether there are tasks left to handle
+        * @return      $tasksLeft      Whether there are tasks left to handle
         */
        public function hasTasksLeft () {
                // Do we have tasks there?
index a98242238a796dd2e60f41d36d58498e726fc047..f66bc15c65691c5209ad971a5ead6d53fc3ac844 100644 (file)
@@ -56,7 +56,7 @@ class BaseConnectionHelper extends BaseHubHelper implements Registerable, Protoc
        private $isInitialized = false;
 
        /**
-        * Wether this connection is shutted down
+        * Whether this connection is shutted down
         */
        private $shuttedDown = false;
 
@@ -205,7 +205,7 @@ class BaseConnectionHelper extends BaseHubHelper implements Registerable, Protoc
         * recipientData array with currently configured timeout.
         *
         * @param       $recipientData  A valid recipient data array, 0=IP; 1=PORT
-        * @return      $isConnected    Wether the connection went fine
+        * @return      $isConnected    Whether the connection went fine
         * @see         Please see http://de.php.net/manual/en/function.socket-connect.php#84465 for original code
         * @todo        Rewrite the while() loop to a iterator to not let the software stay very long here
         */
@@ -439,7 +439,7 @@ class BaseConnectionHelper extends BaseHubHelper implements Registerable, Protoc
        /**
         * Getter for shuttedDown
         *
-        * @return      $shuttedDown    Wether this connection is shutted down
+        * @return      $shuttedDown    Whether this connection is shutted down
         */
        public final function isShuttedDown () {
                /* NOISY-DEBUG: */ $this->debugOutput('CONNECTION: ' . $this->__toString() . ',shuttedDown=' . intval($this->shuttedDown));
index ea605265eb521f1c88063b7441c01179e7a2f7b9..3aca0f56ac24df5c680baac35a8bb1e6447ba7e6 100644 (file)
@@ -94,7 +94,7 @@ class HubPingIterator extends BaseIterator implements Iterator {
        }
 
        /**
-        * Checks wether the current entry is valid (not at the end of the list)
+        * Checks whether the current entry is valid (not at the end of the list)
         *
         * @return      void
         */
index 00e031a6626274b0ed35367fc3660059e8b20735..dcf83cb03e55e1ee538b0cc69433384b35ed9dd3 100644 (file)
@@ -107,9 +107,9 @@ class NetworkListenIterator extends BaseIterator implements Iterator {
        }
 
        /**
-        * Checks wether the current entry is valid (not at the end of the list)
+        * Checks whether the current entry is valid (not at the end of the list)
         *
-        * @return      $isValid        Wether the current entry is there
+        * @return      $isValid        Whether the current entry is there
         */
        public function valid () {
                // Check for total active peers and if we are not at the end
index 52744883713d1d282f8a4dbaf6db25f3572e1483..130bd494b29886acee3addfc46875f3eccdd9f6e 100644 (file)
@@ -105,9 +105,9 @@ class DefaultIterator extends BaseIterator implements Iterator {
        }
 
        /**
-        * Checks wether the current entry is valid (not at the end of the list)
+        * Checks whether the current entry is valid (not at the end of the list)
         *
-        * @return      $isValid        Wether the current entry is there
+        * @return      $isValid        Whether the current entry is there
         */
        public function valid () {
                // Check for total active peers and if we are not at the end
index 0f27de5099cca50d25e762c4674d3b88b8922450..a735e3c36a907dfdb14d10dc8619900afc173062 100644 (file)
@@ -107,9 +107,9 @@ class HandlerPoolIterator extends BaseIterator implements Iterator {
        }
 
        /**
-        * Checks wether the current entry is valid (not at the end of the list)
+        * Checks whether the current entry is valid (not at the end of the list)
         *
-        * @return      $isValid        Wether the current entry is there
+        * @return      $isValid        Whether the current entry is there
         */
        public function valid () {
                // Check for total active peers and if we are not at the end
index c58ba6247d60f93f1bd6d8edf1ef91b34ce8ba19..8cc9ad078a59a887a08f43a6432b97b901858a64 100644 (file)
@@ -107,9 +107,9 @@ class MonitorPoolIterator extends BaseIterator implements Iterator, Registerable
        }
 
        /**
-        * Checks wether the current entry is valid (not at the end of the list)
+        * Checks whether the current entry is valid (not at the end of the list)
         *
-        * @return      $isValid        Wether the current entry is there
+        * @return      $isValid        Whether the current entry is there
         */
        public function valid () {
                // Check for total active peers and if we are not at the end
index 7001854bf2a1db061554cb5c5fdafddb5337fb5a..8d109171f8f66b7b67f98ca9d396db8f47a0e74a 100644 (file)
@@ -105,9 +105,9 @@ class ShutdownPoolIterator extends BaseIterator implements Iterator {
        }
 
        /**
-        * Checks wether the current entry is valid (not at the end of the list)
+        * Checks whether the current entry is valid (not at the end of the list)
         *
-        * @return      $isValid        Wether the current entry is there
+        * @return      $isValid        Whether the current entry is there
         */
        public function valid () {
                // Check for total active peers and if we are not at the end
index 60ea2d0e2afdeca1af901e25efc3badb231e6980..ab110b5df54cd19d352d118cd3af07ca7eb20d8d 100644 (file)
@@ -107,9 +107,9 @@ class TaskPoolIterator extends BaseIterator implements Iterator, Registerable {
        }
 
        /**
-        * Checks wether the current entry is valid (not at the end of the list)
+        * Checks whether the current entry is valid (not at the end of the list)
         *
-        * @return      $isValid        Wether the current entry is there
+        * @return      $isValid        Whether the current entry is there
         */
        public function valid () {
                // Check for total active peers and if we are not at the end
index 77501e46f86c1ac84f67c689db0146e500dcc0b8..277e35b6feceed7d3f73a5b31dc2dc0b6bbaa121 100644 (file)
@@ -124,7 +124,7 @@ class TestUnitKeyProducerIterator extends BaseIterator implements Iterator {
        }
 
        /**
-        * Checks wether the current entry is valid (not at the end of the list)
+        * Checks whether the current entry is valid (not at the end of the list)
         *
         * @return      void
         */
index 6b582191965c4e8d24dc158f1713339cef3e2449..fdae47c8d2e28178fd1617e65ee0c155728e1967 100644 (file)
@@ -48,7 +48,7 @@ class BaseListener extends BaseHubSystem implements Visitable {
        private $listenPort = 0; // This port MUST be changed by your application
 
        /**
-        * Wether we are in blocking or non-blocking mode (default: non-blocking
+        * Whether we are in blocking or non-blocking mode (default: non-blocking
         */
        private $blockingMode = false;
 
@@ -69,10 +69,10 @@ class BaseListener extends BaseHubSystem implements Visitable {
        }
 
        /**
-        * Checks wether the given socket resource is a server socket
+        * Checks whether the given socket resource is a server socket
         *
         * @param       $socketResource         A valid socket resource
-        * @return      $isServerSocket         Wether the socket resource is a server socket
+        * @return      $isServerSocket         Whether the socket resource is a server socket
         */
        protected function isServerSocketResource ($socketResource) {
                // Check it
@@ -181,7 +181,7 @@ class BaseListener extends BaseHubSystem implements Visitable {
        /**
         * Setter for blocking-mode
         *
-        * @param       $blockingMode   Wether blocking-mode is disabled (default) or enabled
+        * @param       $blockingMode   Whether blocking-mode is disabled (default) or enabled
         * @return      void
         */
        protected final function setBlockingMode ($blockingMode) {
@@ -189,9 +189,9 @@ class BaseListener extends BaseHubSystem implements Visitable {
        }
 
        /**
-        * Checks wether blocking-mode is enabled or disabled
+        * Checks whether blocking-mode is enabled or disabled
         *
-        * @return      $blockingMode   Wether blocking mode is disabled or enabled
+        * @return      $blockingMode   Whether blocking mode is disabled or enabled
         */
        public final function isBlockingModeEnabled () {
                return $this->blockingMode;
@@ -244,10 +244,10 @@ class BaseListener extends BaseHubSystem implements Visitable {
        }
 
        /**
-        * Checks wether given socket resource is registered in socket registry
+        * Checks whether given socket resource is registered in socket registry
         *
         * @param       $socketResource         A valid server socket resource
-        * @return      $isRegistered           Wether given server socket is registered
+        * @return      $isRegistered           Whether given server socket is registered
         */
        protected function isServerSocketRegistered ($socketResource) {
                // Get a socket registry instance (singleton)
index fea5cff837c10477fa5c33bac103df0abd15baa7..7ecfb256732e56db24b4d2b4ce6287943b0a08a4 100644 (file)
@@ -268,10 +268,10 @@ class TcpListener extends BaseListener implements Listenable {
        }
 
        /**
-        * Checks wether the listener would accept the given package data array
+        * Checks whether the listener would accept the given package data array
         *
         * @param       $packageData    Raw package data
-        * @return      $accepts                Wether this listener does accept
+        * @return      $accepts                Whether this listener does accept
         */
        public function ifListenerAcceptsPackageData (array $packageData) {
                $this->debugBackTrace('This call should not happen. Please report it.');
index f456e009d63640c5f582fec434aacc0911bcc6cf..dc8c95e6787ae236ad513ba803b172999beaceaa 100644 (file)
@@ -75,10 +75,10 @@ class ClientTcpListenerDecorator extends BaseListenerDecorator implements Listen
        }
 
        /**
-        * Checks wether the listener would accept the given package data array
+        * Checks whether the listener would accept the given package data array
         *
         * @param       $packageData    Raw package data
-        * @return      $accepts                Wether this listener does accept
+        * @return      $accepts                Whether this listener does accept
         */
        public function ifListenerAcceptsPackageData (array $packageData) {
                // Get a tags instance
index 6b818489425ba3abe4dfb0feda15d6467cbe497c..08d16e72eaa50ca735029184a00cad5ee12373c5 100644 (file)
@@ -75,10 +75,10 @@ class HubTcpListenerDecorator extends BaseListenerDecorator implements Listenabl
        }
 
        /**
-        * Checks wether the listener would accept the given package data array
+        * Checks whether the listener would accept the given package data array
         *
         * @param       $packageData    Raw package data
-        * @return      $accepts                Wether this listener does accept
+        * @return      $accepts                Whether this listener does accept
         */
        public function ifListenerAcceptsPackageData (array $packageData) {
                // Get a tags instance
index 5fac3aa4f882ecf4581902b98c7771d6c1433dda..d3842e0f304bb61fafb6b3996b97aec5d203e0e6 100644 (file)
@@ -185,10 +185,10 @@ class UdpListener extends BaseListener implements Listenable {
        }
 
        /**
-        * Checks wether the listener would accept the given package data array
+        * Checks whether the listener would accept the given package data array
         *
         * @param       $packageData    Raw package data
-        * @return      $accepts                Wether this listener does accept
+        * @return      $accepts                Whether this listener does accept
         */
        function ifListenerAcceptsPackageData (array $packageData) {
                $this->partialStub('This call should not happen. Please report it.');
index 6e6da327f9b8189b90796e4f5d8dffdf2a07fa65..af0d9895b80d225ffea7ac9b5ff5b13927b49351 100644 (file)
@@ -75,10 +75,10 @@ class ClientUdpListenerDecorator extends BaseListenerDecorator implements Listen
        }
 
        /**
-        * Checks wether the listener would accept the given package data array
+        * Checks whether the listener would accept the given package data array
         *
         * @param       $packageData    Raw package data
-        * @return      $accepts                Wether this listener does accept
+        * @return      $accepts                Whether this listener does accept
         */
        function ifListenerAcceptsPackageData (array $packageData) {
                // Get a tags instance
index 9a611351fd1b4d5e091f07a8710cf2040f5731a7..2cfc4bcd443fd38d33fc8f50c8e8e6951ac93563 100644 (file)
@@ -75,10 +75,10 @@ class HubUdpListenerDecorator extends BaseListenerDecorator implements Listenabl
        }
 
        /**
-        * Checks wether the listener would accept the given package data array
+        * Checks whether the listener would accept the given package data array
         *
         * @param       $packageData    Raw package data
-        * @return      $accepts                Wether this listener does accept
+        * @return      $accepts                Whether this listener does accept
         */
        public function ifListenerAcceptsPackageData (array $packageData) {
                // Get a tags instance
index 3bc2933e33abb1c716d69c4f26bb0b47c12f0147..5efe2baab27680566c38980eb4e7225aa675e9a0 100644 (file)
@@ -67,10 +67,10 @@ class BaseList extends BaseHubSystem implements IteratorAggregate, Countable {
        }
 
        /**
-        * Checks wether the given group is set
+        * Checks whether the given group is set
         *
         * @param       $groupName      Group to check if found in list
-        * @return      $isset          Wether the group is valid
+        * @return      $isset          Whether the group is valid
         */
        public function isGroupSet ($groupName) {
                //* DEBUG: */ $this->debugOutput(__METHOD__.': '.$groupName);
@@ -320,10 +320,10 @@ class BaseList extends BaseHubSystem implements IteratorAggregate, Countable {
        }
 
        /**
-        * Checks wether the given hash is valid
+        * Checks whether the given hash is valid
         *
         * @param       $hash           The hash we should validate
-        * @return      $isValid        Wether the given hash is valid
+        * @return      $isValid        Whether the given hash is valid
         */
        public final function isHashValid ($hash) {
                // Check it
index 61b9c2e9c843d717061c7fdbb83e158eb0e0130b..07974fad42ddec9c2d308b124c7a67bac54eef84 100644 (file)
@@ -49,13 +49,13 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
        private $queueConnectorInstance = NULL;
 
        /**
-        * Wether this node is anncounced (KEEP ON false!)
+        * Whether this node is anncounced (KEEP ON false!)
         * @deprecated
         */
        private $hubIsAnnounced = false;
 
        /**
-        * Wether this hub is active
+        * Whether this hub is active
         */
        private $isActive = false;
 
@@ -174,10 +174,10 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
        }
 
        /**
-        * Checks wether the given IP address matches one of the bootstrapping nodes
+        * Checks whether the given IP address matches one of the bootstrapping nodes
         *
         * @param       $remoteAddr             IP address to checkout against our bootstrapping list
-        * @return      $isFound                Wether the IP is found
+        * @return      $isFound                Whether the IP is found
         */
        protected function ifAddressMatchesBootstrappingNodes ($remoteAddr) {
                // By default nothing is found
@@ -489,7 +489,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
         * @return      void
         */
        public function activateNode (Requestable $requestInstance, Responseable $responseInstance) {
-               // Checks wether a listener is still active and shuts it down if one
+               // Checks whether a listener is still active and shuts it down if one
                // is still listening.
                if (($this->determineIfListenerIsActive()) && ($this->getIsActive())) {
                        // Shutdown them down before they can hurt anything
@@ -619,7 +619,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
        /**
         * Getter for isActive attribute
         *
-        * @return      $isActive       Wether the hub is active
+        * @return      $isActive       Whether the hub is active
         */
        public final function getIsActive () {
                return $this->isActive;
@@ -628,7 +628,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
        /**
         * Enables (default) or disables isActive flag
         *
-        * @param       $isActive       Wether the hub is active
+        * @param       $isActive       Whether the hub is active
         * @return      void
         */
        public final function enableIsActive ($isActive = true) {
index f2fe68cd8193eaef9d31d9c6df3d5af825737fff..bd094561cb783993cbe75523b799ec212d436b5c 100644 (file)
@@ -455,12 +455,12 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Receiva
        }
 
        /**
-        * Checks wether a package has been enqueued for delivery.
+        * Checks whether a package has been enqueued for delivery.
         *
-        * @return      $isEnqueued             Wether a package is enqueued
+        * @return      $isEnqueued             Whether a package is enqueued
         */
        public function isPackageEnqueued () {
-               // Check wether the stacker is not empty
+               // Check whether the stacker is not empty
                $isEnqueued = (($this->getStackerInstance()->isStackInitialized(self::STACKER_NAME_UNDECLARED)) && (!$this->getStackerInstance()->isStackEmpty(self::STACKER_NAME_UNDECLARED)));
 
                // Return the result
@@ -468,12 +468,12 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Receiva
        }
 
        /**
-        * Checks wether a package has been declared
+        * Checks whether a package has been declared
         *
-        * @return      $isDeclared             Wether a package is declared
+        * @return      $isDeclared             Whether a package is declared
         */
        public function isPackageDeclared () {
-               // Check wether the stacker is not empty
+               // Check whether the stacker is not empty
                $isDeclared = (($this->getStackerInstance()->isStackInitialized(self::STACKER_NAME_DECLARED)) && (!$this->getStackerInstance()->isStackEmpty(self::STACKER_NAME_DECLARED)));
 
                // Return the result
@@ -481,12 +481,12 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Receiva
        }
 
        /**
-        * Checks wether a package should be sent out
+        * Checks whether a package should be sent out
         *
-        * @return      $isWaitingDelivery      Wether a package is waiting for delivery
+        * @return      $isWaitingDelivery      Whether a package is waiting for delivery
         */
        public function isPackageWaitingForDelivery () {
-               // Check wether the stacker is not empty
+               // Check whether the stacker is not empty
                $isWaitingDelivery = (($this->getStackerInstance()->isStackInitialized(self::STACKER_NAME_OUTGOING)) && (!$this->getStackerInstance()->isStackEmpty(self::STACKER_NAME_OUTGOING)));
 
                // Return the result
@@ -594,12 +594,12 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Receiva
        ///////////////////////////////////////////////////////////////////////////
 
        /**
-        * Checks wether decoded raw data is pending
+        * Checks whether decoded raw data is pending
         *
-        * @return      $isPending      Wether decoded raw data is pending
+        * @return      $isPending      Whether decoded raw data is pending
         */
        private function isDecodedDataPending () {
-               // Just return wether the stack is not empty
+               // Just return whether the stack is not empty
                $isPending = (!$this->getStackerInstance()->isStackEmpty(self::STACKER_NAME_DECODED_INCOMING));
 
                // Return the status
@@ -607,10 +607,10 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Receiva
        }
 
        /**
-        * Checks wether new raw package data has arrived at a socket
+        * Checks whether new raw package data has arrived at a socket
         *
         * @param       $poolInstance   An instance of a PoolableListener class
-        * @return      $hasArrived             Wether new raw package data has arrived for processing
+        * @return      $hasArrived             Whether new raw package data has arrived for processing
         */
        public function isNewRawDataPending (PoolableListener $poolInstance) {
                // Visit the pool. This monitors the pool for incoming raw data.
@@ -691,9 +691,9 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Receiva
        }
 
        /**
-        * Checks wether incoming decoded data is handled.
+        * Checks whether incoming decoded data is handled.
         *
-        * @return      $isHandled      Wether incoming decoded data is handled
+        * @return      $isHandled      Whether incoming decoded data is handled
         */
        public function isIncomingDecodedDataHandled () {
                // Determine if the stack is not empty
@@ -731,9 +731,9 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Receiva
        }
 
        /**
-        * Checks wether a new package has arrived
+        * Checks whether a new package has arrived
         *
-        * @return      $hasArrived             Wether a new package has arrived for processing
+        * @return      $hasArrived             Whether a new package has arrived for processing
         */
        public function isNewPackageArrived () {
                // @TODO Add some content here
index 9b1b8d52dd027e39a26be4331b0c3aa480ac5ae2..81f63f242273c2bad97f64db60461f7bfceb55cd 100644 (file)
@@ -165,10 +165,10 @@ class PackageFragmenter extends BaseFrameworkSystem implements Fragmentable, Reg
        }
 
        /**
-        * Checks wether the given package data is already processed by this fragmenter
+        * Checks whether the given package data is already processed by this fragmenter
         *
         * @param       $packageData    Raw package data array
-        * @return      $isProcessed    Wether the package has been fragmented
+        * @return      $isProcessed    Whether the package has been fragmented
         */
        private function isPackageProcessed (array $packageData) {
                // Get array index
index e69b83f7fe86c641f85938db29d3bff0ed774527..fc5ee32e7efda9cf5fcc94e292f5b04e1b3e780e 100644 (file)
@@ -137,10 +137,10 @@ abstract class BaseProducer extends BaseFrameworkSystem {
        }
 
        /**
-        * Checks wether a configurable out-going queue limit has been reached
+        * Checks whether a configurable out-going queue limit has been reached
         *
         * @param       $configEntry    Configuration entry where the limit is stored
-        * @return      $isReached              Wether the limit is reached
+        * @return      $isReached              Whether the limit is reached
         */
        protected function isOutgoingQueueLimitReached($configEntry) {
                return ($this->getConfigInstance()->getConfigEntry($configEntry) <= $this->getOutgoingQueueInstance()->getStackCount('outgoing_queue'));
@@ -166,10 +166,10 @@ abstract class BaseProducer extends BaseFrameworkSystem {
        }
 
        /**
-        * Checks wether a configurable incoming queue limit has been reached
+        * Checks whether a configurable incoming queue limit has been reached
         *
         * @param       $configEntry    Configuration entry where the limit is stored
-        * @return      $isReached              Wether the limit is reached
+        * @return      $isReached              Whether the limit is reached
         */
        protected function isIncomingQueueLimitReached($configEntry) {
                return ($this->getConfigInstance()->getConfigEntry($configEntry) <= $this->getIncomingQueueInstance()->getStackCount('incoming_queue'));
index ea124312c4c4c1f959c373989c65a1132c8ae2ed..3c6ce0bdf5832fb38e53b11b1419a1b82b0fbcc1 100644 (file)
@@ -90,10 +90,10 @@ class ConnectionRegistry extends BaseRegistry implements Register, RegisterableC
        }
 
        /**
-        * Checks wether the given protocol is registered
+        * Checks whether the given protocol is registered
         *
         * @param       $connectionInstance     An instance of a ConnectionHelper class
-        * @return      $isRegistered           Wether the protocol is registered
+        * @return      $isRegistered           Whether the protocol is registered
         */
        private function isProtocolRegistered (ConnectionHelper $connectionInstance) {
                // Get the key
@@ -107,12 +107,12 @@ class ConnectionRegistry extends BaseRegistry implements Register, RegisterableC
        }
 
        /**
-        * Checks wether given socket resource is registered. If $socketResource is
+        * Checks whether given socket resource is registered. If $socketResource is
         * false only the instance will be checked.
         *
         * @param       $connectionInstance             An instance of a ConnectionHelper class
         * @param       $socketResource                 A valid socket resource
-        * @return      $isRegistered                   Wether the given socket resource is registered
+        * @return      $isRegistered                   Whether the given socket resource is registered
         */
        public function isConnectionRegistered (ConnectionHelper $connectionInstance, $socketResource) {
                // Default is not registered
index bc72879d039b4419abf11d7bf20b69fc5e42f5f2..c07eceb46927a12ed487b24c71a860bab62e79c3 100644 (file)
@@ -90,10 +90,10 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
        }
 
        /**
-        * Checks wether the given protocol is registered
+        * Checks whether the given protocol is registered
         *
         * @param       $protocolInstance       An instance of a ProtocolHandler class
-        * @return      $isRegistered           Wether the protocol is registered
+        * @return      $isRegistered           Whether the protocol is registered
         */
        private function isProtocolRegistered (ProtocolHandler $protocolInstance) {
                // Get the key
@@ -107,12 +107,12 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
        }
 
        /**
-        * Checks wether given socket resource is registered. If $socketResource is
+        * Checks whether given socket resource is registered. If $socketResource is
         * false only the instance will be checked.
         *
         * @param       $protocolInstance       An instance of a ProtocolHandler class
         * @param       $socketResource         A valid socket resource
-        * @return      $isRegistered           Wether the given socket resource is registered
+        * @return      $isRegistered           Whether the given socket resource is registered
         */
        public function isSocketRegistered (ProtocolHandler $protocolInstance, $socketResource) {
                // Default is not registered
index 4b8d3f3eb99e60e944df80a3e8ace4dff596bc02..e1af7c9dc97478e7bacfd6c339c34a764670ffe0 100644 (file)
@@ -118,10 +118,10 @@ class BaseStateResolver extends BaseResolver {
        }
 
        /**
-        * Checks wether the given state is valid
+        * Checks whether the given state is valid
         *
         * @param       $stateName                              The default state we shall execute
-        * @return      $isValid                                Wether the given state is valid
+        * @return      $isValid                                Whether the given state is valid
         * @throws      EmptyVariableException  Thrown if given state is not set
         * @throws      DefaultStateException   Thrown if default state was not found
         */
index c65ef1a6fa2895b8695b1f6615265f73b030cd6f..ea017b07cfe01e45a225d064c412bddf2722419c 100644 (file)
@@ -34,7 +34,7 @@ class BaseCruncherState extends BaseState {
        }
 
        /**
-        * Validates wether the state is 'active' or throws an exception if
+        * Validates whether the state is 'active' or throws an exception if
         * it is every other state.
         *
         * @return      void
@@ -51,7 +51,7 @@ class BaseCruncherState extends BaseState {
        /**
         * Checks if this state is 'virgin'
         *
-        * @return      $isVirgin       Wether this state is 'virgin'
+        * @return      $isVirgin       Whether this state is 'virgin'
         */
        public function isCruncherStateVirgin () {
                // Just compare it...
index 6b37c14d58ac9519479658a8689d64ab56e300ee..3b18ffde23f9b94d19c03501982189d9790e6d22 100644 (file)
@@ -34,7 +34,7 @@ class BaseNodeState extends BaseState {
        }
 
        /**
-        * Validates wether the state is 'active' or throws an exception if
+        * Validates whether the state is 'active' or throws an exception if
         * it is every other state.
         *
         * @return      void
index b5d9bc4012fa40539badd544a7567631dac9e5f4..e95c5c3624acc2b36ee6c7ced502432c47cf732c 100644 (file)
@@ -34,7 +34,7 @@ class BasePeerState extends BaseState {
        }
 
        /**
-        * Validates wether the state is 'connected' or throws an exception if
+        * Validates whether the state is 'connected' or throws an exception if
         * it is every other state.
         *
         * @return      void
@@ -49,9 +49,9 @@ class BasePeerState extends BaseState {
        }
 
        /**
-        * Checks wether the peer's state is 'connected'
+        * Checks whether the peer's state is 'connected'
         *
-        * @return      $isConnected                    Wether the state is 'connected'
+        * @return      $isConnected                    Whether the state is 'connected'
         */
        public function isPeerStateConnected () {
                // Just compare it...
index 2a448e3e180e04bdac45abe6acf8af34f61a5197..4e42fe89c94a9a6319b1ab6d8b0398ac7e016ab3 100644 (file)
@@ -50,11 +50,11 @@ class ConnectionStatisticsHelper extends BaseHubSystem {
        }
 
        /**
-        * Checks wether the retry count has reached a configured limit for given
+        * Checks whether the retry count has reached a configured limit for given
         * connection.
         *
         * @param       $helperInstance         An instance of a ConnectionHelper class
-        * @return      $isExhausted            Wether the retry count has been reached
+        * @return      $isExhausted            Whether the retry count has been reached
         */
        public static function isConnectRetryExhausted (ConnectionHelper $helperInstance) {
                //* NOISY-DEBUG: */ $helperInstance->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: helperInstance=' . $helperInstance->__toString() . ' - ENTERED!');
index 4047b961d88e678b2ae63410a6c0680f663a9c76..5b39ff61b5b1c8e4c1d16824886ff0c96f60d664 100644 (file)
@@ -160,11 +160,11 @@ class PackageTags extends BaseTags implements Tagable {
        }
 
        /**
-        * Checks wether the given package data is accepted by the listener
+        * Checks whether the given package data is accepted by the listener
         *
         * @param       $packageData            Raw package data
         * @param       $listenerInstance       A Listenable instance
-        * @return      $accepts                        Wether it is accepted
+        * @return      $accepts                        Whether it is accepted
         */
        public function ifPackageDataIsAcceptedByListener (array $packageData, Listenable $listenerInstance) {
                // Extract the tags
index 66a45e537db557b1c3bb771a5bb1828b1207d247..5d931a6051629d26600bdbdb76e87fe84cae1b95 100644 (file)
--- a/index.php
+++ b/index.php
@@ -52,7 +52,7 @@ final class ApplicationEntryPoint {
         * @param       $message                The optional message we shall output on exit
         * @param       $code                   Error code from exception
         * @param       $extraData              Extra information from exceptions
-        * @param       $silentMode             Wether not silent mode is turned on
+        * @param       $silentMode             Whether silent mode is turned on
         * @return      void
         * @todo        This method is old code and needs heavy rewrite and should be moved to ApplicationHelper
         */