* 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
*/
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) {
// Does it match?
if ($ipPortArray[0] == $remoteAddr) {
// Found it!
- $isFound = true;
+ $isFound = TRUE;
// Remember the port number
$this->bootIpPort = $ipPort;
* 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;
*/
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
* @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;
}
*/
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;
* @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;
}