*/
public function __construct (array $messageData, $code) {
// Construct the message
- $message = sprintf("[%s:%d] This node (%s) didn't except a node-list request: %s",
+ $message = sprintf('[%s:%d] This node (%s) didn't except a node-list request: %s',
$messageData[0]->__toString(),
$this->getLine(),
$messageData[1]->__toString(),
- print_r($messageData[2], true)
+ print_r($messageData[2], TRUE)
);
// Call parent exception constructor
*/
public function __construct (array $messageData, $code) {
// Construct the message
- $message = sprintf("[%s:%d] This node (%s) does not accept request: %s",
+ $message = sprintf('[%s:%d] This node (%s) does not accept request: %s',
$messageData[0]->__toString(),
$this->getLine(),
$messageData[1]->__toString(),
- print_r($messageData[2], true)
+ print_r($messageData[2], TRUE)
);
// Call parent exception constructor
/**
* Checks whether the raw package data has been assembled back together.
* This can be safely assumed when rawPackageData is not empty and the
- * collection of all chunks is false (because initHandler() will reset it).
+ * collection of all chunks is FALSE (because initHandler() will reset it).
*
* @return $isRawPackageDataAvailable Whether raw package data is available
*/
/**
* Activates the hub by doing some final preparation and setting
- * $hubIsActive to true
+ * $hubIsActive to TRUE.
*
* @param $requestInstance A Requestable class
* @param $responseInstance A Responseable class
$chunkSplits = explode(PackageFragmenter::CHUNK_DATA_HASH_SEPARATOR, $chunks[count($chunks) - 1]);
// Make sure chunks with only 3 elements are parsed (for details see ChunkHandler)
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('eopChunk=' . $chunks[count($chunks) - 1] . ',chunkSplits=' . print_r($chunkSplits, true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('eopChunk=' . $chunks[count($chunks) - 1] . ',chunkSplits=' . print_r($chunkSplits, TRUE));
assert(count($chunkSplits) == 3);
// Validate final chunk
/*
* -------------------------- Hub activation --------------------------
* Activates the node by doing some final preparation steps and setting
- * the attribute $hubIsActive to true
+ * the attribute $hubIsActive to TRUE.
*/
$nodeInstance->activateNode($requestInstance, $responseInstance);
$searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-FACADE[' . __LINE__ . ']: state=' . $this->getPrintableState() . ',messageData=' . print_r($messageData, true) . ',handlerInstance=' . $handlerInstance->__toString() . ',forceUpdate=' . intval($forceUpdate) . ',count(getSearchData())=' . count($handlerInstance->getSearchData()));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-FACADE[' . __LINE__ . ']: state=' . $this->getPrintableState() . ',messageData=' . print_r($messageData, TRUE) . ',handlerInstance=' . $handlerInstance->__toString() . ',forceUpdate=' . intval($forceUpdate) . ',count(getSearchData())=' . count($handlerInstance->getSearchData()));
// Search for the node's session id and external IP/hostname + TCP/UDP listen port
foreach ($handlerInstance->getSearchData() as $key) {
assert((isset($messageData[$excludeKey])) && (isset($messageData[$andKey])));
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-FACADE[' . __LINE__ . ']: state=' . $this->getPrintableState() . ',messageData=' . print_r($messageData, true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-FACADE[' . __LINE__ . ']: state=' . $this->getPrintableState() . ',messageData=' . print_r($messageData, TRUE));
// Get a search criteria class
$searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
} // END - if
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('protocolName=' . $protocolName . ',packageData=' . print_r($packageData, true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('protocolName=' . $protocolName . ',packageData=' . print_r($packageData, TRUE));
/*
* Now we have the listener instance, we can determine the right
// Debug message
if (is_resource($socketResource)) {
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',error=' . socket_strerror(socket_last_error($socketResource)) . ',packageData=' . print_r($packageData, true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',error=' . socket_strerror(socket_last_error($socketResource)) . ',packageData=' . print_r($packageData, TRUE));
} else {
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',packageData=' . print_r($packageData, true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',packageData=' . print_r($packageData, TRUE));
}
- // Is it false, the recipient isn't known to us and we have no connection to it
+ // Is it FALSE, the recipient isn't known to us and we have no connection to it
if (($socketResource === FALSE) || (!is_resource($socketResource)) || (socket_last_error($socketResource) > 0)) {
// Try to create a new socket resource
try {
// This cannot be fixed, so log it away
self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __LINE__ . ']: Cannot discover socket resource for recipient ' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] . ': ' . $e->getMessage());
- // Make any failed attempts to 'false'
+ // Make any failed attempts to 'FALSE'
$socketResource = FALSE;
}
// And return it
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __LINE__ . ']: socketResource=' . $socketResource . ',packageData=' . print_r($packageData, true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __LINE__ . ']: socketResource=' . $socketResource . ',packageData=' . print_r($packageData, TRUE));
return $socketResource;
}
}
// ... and for the hashes
'hashes' => array(),
// ... marker for that the final array is complete for assembling all chunks
- 'is_complete' => false,
+ 'is_complete' => FALSE,
// ... steps done to assemble all chunks
'assemble_steps' => 0,
);
*/
private function isChunkHashValid (array $chunkSplits) {
// Now hash the raw data again
- $chunkHash = $this->getCryptoInstance()->hashString($chunkSplits[self::CHUNK_SPLITS_INDEX_RAW_DATA], $chunkSplits[self::CHUNK_SPLITS_INDEX_HASH], false);
+ $chunkHash = $this->getCryptoInstance()->hashString($chunkSplits[self::CHUNK_SPLITS_INDEX_RAW_DATA], $chunkSplits[self::CHUNK_SPLITS_INDEX_HASH], FALSE);
// Debug output
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CHUNK-HANDLER[' . __LINE__ . ']: chunkHash=' . $chunkHash . ',chunkSplits[chunk_hash]=' . $chunkSplits[self::CHUNK_SPLITS_INDEX_HASH] . ',chunkSplits[serial]=' . $chunkSplits[self::CHUNK_SPLITS_INDEX_SERIAL] . ',chunkSplits[raw_data]=' . $chunkSplits[self::CHUNK_SPLITS_INDEX_RAW_DATA]);
*/
private function isSerialNumberValid ($serialNumber) {
// Check it
- $isValid = ((strlen($serialNumber) == PackageFragmenter::MAX_SERIAL_LENGTH) && ($this->hexval($serialNumber, false) === $serialNumber));
+ $isValid = ((strlen($serialNumber) == PackageFragmenter::MAX_SERIAL_LENGTH) && ($this->hexval($serialNumber, FALSE) === $serialNumber));
// Return result
return $isValid;
* @return void
*/
private function preparePackageAssmble () {
- // Make sure both arrays have same count (this however should always be true)
+ // Make sure both arrays have same count (this however should always be TRUE)
assert(count($this->finalPackageChunks['hashes']) == count($this->finalPackageChunks['content']));
- //* DIE: */ exit(__METHOD__ . ':finalPackageChunks='.print_r($this->finalPackageChunks['content'],true));
+ //* DIE: */ exit(__METHOD__ . ':finalPackageChunks='.print_r($this->finalPackageChunks['content'], TRUE));
/*
* Remove last element (hash chunk) from 'hashes'. This hash will never
foreach ($this->finalPackageChunks['content'] as $serialNumber => $content) {
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CHUNK-HANDLER[' . __LINE__ . ']: serialNumber=' . $serialNumber . ' - validating ...');
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('finalPackageChunks=' . print_r($this->finalPackageChunks,true) . 'chunkHashes=' . print_r($this->chunkHashes,true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('finalPackageChunks=' . print_r($this->finalPackageChunks, TRUE) . 'chunkHashes=' . print_r($this->chunkHashes, TRUE));
// Is this chunk valid? This should be the case
assert($this->isChunkHashValid(array(
} // END - foreach
// Debug output
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CHUNK-HANDLER[' . __LINE__ . ']: eopChunk[1]=' . $this->eopChunk[1] . ',' . chr(10) . 'index=' . (count($this->chunkHashes) - 2) . ',' . chr(10) . 'chunkHashes='.print_r($this->chunkHashes,true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CHUNK-HANDLER[' . __LINE__ . ']: eopChunk[1]=' . $this->eopChunk[1] . ',' . chr(10) . 'index=' . (count($this->chunkHashes) - 2) . ',' . chr(10) . 'chunkHashes='.print_r($this->chunkHashes, TRUE));
// The last chunk hash must match with the one from eopChunk[1]
assert($this->eopChunk[1] == $this->chunkHashes[count($this->chunkHashes) - 2]);
*/
private function verifyRawPackageData () {
// Hash the raw package data for final verification
- $finalHash = $this->getCryptoInstance()->hashString($this->rawPackageData, $this->eopChunk[0], false);
+ $finalHash = $this->getCryptoInstance()->hashString($this->rawPackageData, $this->eopChunk[0], FALSE);
// Is it the same?
assert($finalHash == $this->eopChunk[0]);
/**
* Checks whether the raw package data has been assembled back together.
* This can be safely assumed when rawPackageData is not empty and the
- * collection of all chunks is false (because initHandler() will reset it).
+ * collection of all chunks is FALSE (because initHandler() will reset it).
*
* @return $isRawPackageDataAvailable Whether raw package data is available
*/
*/
protected function initMessageConfigurationData (array $messageData) {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('ANNOUNCEMENT-HANDLER[' . __LINE__ . ']: messageData=' . print_r($messageData, true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('ANNOUNCEMENT-HANDLER[' . __LINE__ . ']: messageData=' . print_r($messageData, TRUE));
// "Walk" throught the translation array
foreach ($this->messageToConfig as $messageKey => $configKey) {
parent::addArrayToDataSet($dataSetInstance, $messageData);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('ANSWER-HANDLER[' . __LINE__ . ']: messageData=' . print_r($messageData, true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('ANSWER-HANDLER[' . __LINE__ . ']: messageData=' . print_r($messageData, TRUE));
// Add all ements
foreach ($this->messageDataElements as $key) {
*/
protected function initMessageConfigurationData (array $messageData) {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('REQUEST-HANDLER[' . __LINE__ . ']: messageData=' . print_r($messageData, true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('REQUEST-HANDLER[' . __LINE__ . ']: messageData=' . print_r($messageData, TRUE));
// "Walk" throught the config-copy array
foreach ($this->configCopy as $targetKey => $sourceKey) {
} else {
// Something really horrible happened
// @TODO Throw an exception here instead of dying
- $this->debugInstance(__METHOD__ . ': ids mismatching! messageData=' . print_r($messageData, true));
+ $this->debugInstance(__METHOD__ . ': ids mismatching! messageData=' . print_r($messageData, TRUE));
}
}
// Should we start now?
if ($diff < $currentTask['task_startup_delay']) {
// Skip this silently
- return false;
+ return;
} // END - if
// Launch the task and mark it as updated
} // END - if
// Skip this silently
- return false;
+ return;
} // END - if
// Set last activity
// Identifier for the generateHash() method
'id' => $taskName,
// Whether the task is started
- 'task_started' => false,
+ 'task_started' => FALSE,
// Whether the task is paused (not yet implemented)
- 'task_paused' => false,
+ 'task_paused' => FALSE,
// Whether the task can be paused (not yet implemented)
- 'task_pauseable' => true,
+ 'task_pauseable' => TRUE,
// Timestamp of registration
'task_registered' => $this->getMilliTime(),
// Last activity timestamp
// Is the required data there?
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-HELPER[' . __LINE__ . ']: chunkHashes[]=' . count($chunkHashes) . ',chunkData[]=' . count($chunkData));
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('chunkData='.print_r($chunkData,true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('chunkData='.print_r($chunkData, TRUE));
if ((isset($chunkHashes[0])) && (isset($chunkData[0]))) {
// Remember this chunk as queued
$this->queuedChunks[$chunkHashes[0]] = $chunkData[0];
$this->shuttedDown = TRUE;
// And remove the (now invalid) socket
- $this->setSocketResource(false);
+ $this->setSocketResource(FALSE);
}
/**
// Some new peers found?
if ($left < 1) {
// Debug message
- //* EXTREME-NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TCP-LISTENER[' . __LINE__ . ']: left=' . $left . ',serverSocket=' . $this->getSocketResource() . ',readers=' . print_r($readers, true));
+ //* EXTREME-NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TCP-LISTENER[' . __LINE__ . ']: left=' . $left . ',serverSocket=' . $this->getSocketResource() . ',readers=' . print_r($readers, TRUE));
// Nothing new found
return;
} // END - if
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TCP-LISTENER[' . __LINE__ . ']: serverSocket=' . $this->getSocketResource() . ',readers=' . print_r($readers, true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TCP-LISTENER[' . __LINE__ . ']: serverSocket=' . $this->getSocketResource() . ',readers=' . print_r($readers, TRUE));
// Do we have changed peers?
if (in_array($this->getSocketResource(), $readers)) {
// Output result (only for debugging!)
/*
$option = socket_get_option($newSocket, SOL_SOCKET, SO_RCVTIMEO);
- self::createDebugInstance(__CLASS__)->debugOutput('SO_RCVTIMEO[' . gettype($option) . ']=' . print_r($option, true));
+ self::createDebugInstance(__CLASS__)->debugOutput('SO_RCVTIMEO[' . gettype($option) . ']=' . print_r($option, TRUE));
*/
// Enable SO_OOBINLINE
private $queueConnectorInstance = NULL;
/**
- * Whether this node is anncounced (KEEP ON false!)
+ * Whether this node is anncounced (keep on FALSE!)
* @deprecated
*/
private $hubIsAnnounced = FALSE;
/**
- * Whether this hub is active (default: false)
+ * Whether this hub is active (default: FALSE)
*/
private $isActive = FALSE;
/**
- * Whether this node accepts announcements (default: false)
+ * Whether this node accepts announcements (default: FALSE)
*/
private $acceptAnnouncements = FALSE;
/**
* Activates the hub by doing some final preparation and setting
- * $hubIsActive to true
+ * $hubIsActive to TRUE.
*
* @param $requestInstance A Requestable class
* @param $responseInstance A Responseable class
/**
* Enables whether this node accepts announcements
*
- * @param $acceptAnnouncements Whether this node accepts announcements (default: true)
+ * @param $acceptAnnouncements Whether this node accepts announcements (default: TRUE)
* @return void
*/
protected final function enableAcceptingAnnouncements ($acceptAnnouncements = TRUE) {
/*
* Only 'regular' nodes does not accept such requests, checking
* HubRegularNode is faster, but if e.g. HubRegularI2PNode will be
- * added then the next check will be true.
+ * added then the next check will be TRUE.
*/
$acceptsRequest = ((!$this instanceof HubRegularNode) && ($this->getRequestInstance()->getRequestElement('mode') != self::NODE_TYPE_REGULAR));
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER: Partial data received. Waiting for more ... ( ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes)');
} else {
// Debug message
- /* DEBUG */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER: packageContent=' . print_r($packageContent,true) . ',chunks='.print_r($chunks,true));
+ /* DEBUG */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER: packageContent=' . print_r($packageContent, TRUE) . ',chunks='.print_r($chunks, TRUE));
}
}
*/
private function generatePackageSignature ($content, $senderId) {
// Hash content and sender id together, use md5() as last algo
- $hash = md5($this->getCryptoInstance()->hashString($senderId . $content, $this->getPrivateKey(), false));
+ $hash = md5($this->getCryptoInstance()->hashString($senderId . $content, $this->getPrivateKey(), FALSE));
// Encrypt the content again with the hash as a key
$encryptedContent = $this->getCryptoInstance()->encryptString($content, $hash);
// Is it the same?
//$isSignatureValid =
- exit(__METHOD__.': signature='.$signature.chr(10).',decodedArray='.print_r($decodedArray,true));
+ exit(__METHOD__.': signature='.$signature.chr(10).',decodedArray='.print_r($decodedArray, TRUE));
}
/**
$decodedData = $handlerInstance->getNextRawData();
// Very noisy debug message:
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __LINE__ . ']: decodedData[' . gettype($decodedData) . ']=' . print_r($decodedData, true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __LINE__ . ']: decodedData[' . gettype($decodedData) . ']=' . print_r($decodedData, TRUE));
// And push it on our stack
$this->getStackerInstance()->pushNamed(self::STACKER_NAME_DECODED_INCOMING, $decodedData);
*/
public function clearAllStacker () {
// Call the init method to force re-initialization
- $this->initStackers(true);
+ $this->initStackers(TRUE);
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __LINE__ . ']: All stacker have been re-initialized.');
$messageArray[self::MESSAGE_ARRAY_DATA][self::MESSAGE_ARRAY_TYPE] = $messageArray[self::MESSAGE_ARRAY_TYPE];
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __LINE__ . ']: messageArray=' . print_r($messageArray, true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __LINE__ . ']: messageArray=' . print_r($messageArray, TRUE));
// Create a handler instance from given message type
$handlerInstance = MessageTypeHandlerFactory::createMessageTypeHandlerInstance($messageArray[self::MESSAGE_ARRAY_TYPE]);
$rawData = self::HASH_CHUNK_IDENTIFIER . implode(self::CHUNK_HASH_SEPARATOR, $this->chunkHashes[$finalHash]);
// Prepend chunk
- $this->addChunkData($finalHash, $rawData, true);
+ $this->addChunkData($finalHash, $rawData, TRUE);
}
/**
*
* @param $finalHash Final hash for faster lookup
* @return $rawDataChunk Raw package data chunk
- * @throws AssertionException If $finalHash was not 'true'
+ * @throws AssertionException If $finalHash was not 'TRUE'
*/
public function getNextRawDataChunk ($finalHash) {
// Debug message
// Get current chunk index
$current = $this->getCurrentChunkPointer($finalHash);
} catch (AssertionException $e) {
- // This may happen when the final hash is true
+ // This may happen when the final hash is TRUE
if ($finalHash === TRUE) {
// Set current to null
$current = NULL;
*/
protected function isValidConnectionType ($connectionType) {
// Is it valid?
- $isValid = in_array($connectionType, $this->connectionTypes, true);
+ $isValid = in_array($connectionType, $this->connectionTypes, TRUE);
// Return result
return $isValid;
* @return void
*/
protected function initOutgoingQueue () {
- $this->getOutgoingQueueInstance()->initStacker(self::STACKER_NAME_OUT_QUEUE, true);
+ $this->getOutgoingQueueInstance()->initStacker(self::STACKER_NAME_OUT_QUEUE, TRUE);
}
/**
* @return void
*/
protected function initIncomingQueue () {
- $this->getIncomingQueueInstance()->initStacker(self::STACKER_NAME_IN_QUEUE, true);
+ $this->getIncomingQueueInstance()->initStacker(self::STACKER_NAME_IN_QUEUE, TRUE);
}
/**
/**
* Checks whether given socket resource is registered. If $socketResource is
- * false only the instance will be checked.
+ * FALSE only the instance will be checked.
*
* @param $connectionInstance An instance of a ConnectionHelper class
* @param $socketResource A valid socket resource
*/
public function getRegisteredConnectionResource (ConnectionHelper $connectionInstance) {
// The socket must be registered before we can return it
- if (!$this->isConnectionRegistered($connectionInstance, false)) {
+ if (!$this->isConnectionRegistered($connectionInstance, FALSE)) {
// Throw the exception
throw new NoConnectionRegisteredException ($connectionInstance, self::CONNECTION_NOT_REGISTERED);
} // END - if
/**
* Checks whether given socket resource is registered. If $socketResource is
- * false only the instance will be checked.
+ * FALSE only the instance will be checked.
*
* @param $protocolInstance An instance of a ProtocolHandler class
* @param $socketResource A valid socket resource
// Is this string empty?
if (empty($characters)) {
// Then skip it silently
- return false;
+ return;
} // END - if
/*
// Is this string empty?
if (empty($characters)) {
// Then skip it silently
- return false;
+ return;
} // END - if
/*
// Is this string empty?
if (empty($characters)) {
// Then skip it silently
- return false;
+ return;
} // END - if
/*
// Is this string empty?
if (empty($characters)) {
// Then skip it silently
- return false;
+ return;
} // END - if
/*
// Is this string empty?
if (empty($characters)) {
// Then skip it silently
- return false;
+ return;
} // END - if
/*
// Is this string empty?
if (empty($characters)) {
// Then skip it silently
- return false;
+ return;
} // END - if
// Assign data with matching variable here
// Is this string empty?
if (empty($characters)) {
// Then skip it silently
- return false;
+ return;
} // END - if
// Get current XML node name as an array index
// Is this string empty?
if (empty($characters)) {
// Then skip it silently
- return false;
+ return;
} // END - if
// Assign the found characters to variable and use the last entry from
// Is this string empty?
if (empty($characters)) {
// Then skip it silently
- return false;
+ return;
} // END - if
// Assign data with matching variable here
// And ask it for session id by given ip:port
$recipient = $selfInstance->getDhtInstance()->findNodeByIpPort($ipPort);
- die(__METHOD__.':recipient=<pre>'.print_r($recipient, true).'</pre>' . PHP_EOL);
+ die(__METHOD__.':recipient=<pre>'.print_r($recipient, TRUE).'</pre>' . PHP_EOL);
// Return result
return $sessionId;
exit();
} else {
// Output message and die
- exit(sprintf("[Main:] Emergency exit reached: <span class=\"emergency_span\">%s</span>",
+ exit(sprintf('[Main:] Emergency exit reached: <span class="emergency_span">%s</span>',
$message
));
}
} // END - class
// Developer mode active? Comment out if no dev!
-define('DEVELOPER', true);
+define('DEVELOPER', TRUE);
// Log all exceptions (only debug! This option can create large error logs)
-//define('LOG_EXCEPTIONS', true);
+//define('LOG_EXCEPTIONS', TRUE);
//xdebug_start_trace();