]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/nodes/class_BaseHubNode.php
Opps, wrong name :(
[hub.git] / application / hub / main / nodes / class_BaseHubNode.php
index e1b3681a8f2cd24c926f43a7190794201789e3f9..1b052c5b909073397a5c4135d050f209078b1522 100644 (file)
@@ -55,17 +55,17 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
         * Whether this node is anncounced (KEEP ON false!)
         * @deprecated
         */
-       private $hubIsAnnounced = false;
+       private $hubIsAnnounced = FALSE;
 
        /**
         * Whether this hub is active (default: false)
         */
-       private $isActive = false;
+       private $isActive = FALSE;
 
        /**
         * Whether this node accepts announcements (default: false)
         */
-       private $acceptAnnouncements = false;
+       private $acceptAnnouncements = FALSE;
 
        /**
         * Protected constructor
@@ -207,7 +207,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
         */
        protected function ifAddressMatchesBootstrappingNodes ($remoteAddr) {
                // By default nothing is found
-               $isFound = false;
+               $isFound = FALSE;
 
                // Run through all configured IPs
                foreach (explode(BaseHubSystem::BOOTSTRAP_NODES_SEPARATOR, $this->getConfigInstance()->getConfigEntry('hub_bootstrap_nodes')) as $ipPort) {
@@ -217,7 +217,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
                        // Does it match?
                        if ($ipPortArray[0] == $remoteAddr) {
                                // Found it!
-                               $isFound = true;
+                               $isFound = TRUE;
 
                                // Remember the port number
                                $this->bootIpPort = $ipPort;
@@ -232,7 +232,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
                                 * IP matches listen address. At this point we really don't care
                                 * if we can really listen on that address
                                 */
-                               $isFound = true;
+                               $isFound = TRUE;
 
                                // Remember the port number
                                $this->bootIpPort = $ipPort;
@@ -453,7 +453,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
         */
        public function announceToUpperNodes (Taskable $taskInstance) {
                // Is this hub node announced?
-               if ($this->hubIsAnnounced === true) {
+               if ($this->hubIsAnnounced === TRUE) {
                        // Already announced!
                        throw new NodeAlreadyAnnouncedException($this, self::EXCEPTION_HUB_ALREADY_ANNOUNCED);
                } // END - if
@@ -621,7 +621,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
         * @param       $isActive       Whether the hub is active
         * @return      void
         */
-       public final function enableIsActive ($isActive = true) {
+       public final function enableIsActive ($isActive = TRUE) {
                $this->isActive = (bool) $isActive;
        }
 
@@ -632,7 +632,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
         */
        public final function isAcceptingAnnouncements () {
                // Check it (this node must be active and not shutdown!)
-               $acceptAnnouncements = (($this->acceptAnnouncements === true) && ($this->isNodeActive()));
+               $acceptAnnouncements = (($this->acceptAnnouncements === TRUE) && ($this->isNodeActive()));
 
                // Return it
                return $acceptAnnouncements;
@@ -684,7 +684,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
         * @param       $acceptAnnouncements    Whether this node accepts announcements (default: true)
         * @return      void
         */
-       protected final function enableAcceptingAnnouncements ($acceptAnnouncements = true) {
+       protected final function enableAcceptingAnnouncements ($acceptAnnouncements = TRUE) {
                $this->acceptAnnouncements = $acceptAnnouncements;
        }