// CFG: DEFAULT-CONSOLE-COMMAND
$cfg->setConfigEntry('default_console_command', 'main');
-// CFG: DEFAULT-HUBCONSOLE-COMMAND
-$cfg->setConfigEntry('default_hubconsole_command', 'main');
+// CFG: DEFAULT-HUB-CONSOLE-COMMAND
+$cfg->setConfigEntry('default_hub_console_command', 'main');
-// CFG: HUBCONSOLE-CMD-MAIN-RESOLVER-CLASS
-$cfg->setConfigEntry('hubconsole_cmd_main_resolver_class', 'HubConsoleCommandResolver');
+// CFG: HUB-CONSOLE-CMD-MAIN-RESOLVER-CLASS
+$cfg->setConfigEntry('hub_console_cmd_main_resolver_class', 'HubConsoleCommandResolver');
// CFG: NETWORK-STATE-RESOLVER-CLASS
$cfg->setConfigEntry('network_state_resolver_class', 'NetworkStateResolver');
$cfg->setConfigEntry('miner_buffer_stacker_class', 'FiFoStacker');
// CFG: HUBCONSOLE-CMD-CRUNCHER-RESOLVER-CLASS
-$cfg->setConfigEntry('hubconsole_cmd_miner_resolver_class', 'HubConsoleCommandResolver');
+$cfg->setConfigEntry('hub_console_cmd_miner_resolver_class', 'HubConsoleCommandResolver');
// CFG: MINER-PHP-REQUIREMENTS-FILTER
$cfg->setConfigEntry('miner_php_requirements_filter', 'MinerPhpRequirementsFilter');
* Monitors incoming raw data from the handler and transfers it to the
* given receiver instance.
*
- * @param $receiverInstance An instance of a Receivable class
* @return void
*/
- function monitorIncomingRawData (Receivable $receiverInstance);
+ function monitorIncomingRawData ();
/**
* Getter for listen address
/**
* Checks whether new raw data from the socket has arrived
*
- * @param $poolInstance An instance of a PoolableListener class
* @return $hasArrived Whether raw package data has arrived at a socket
*/
- function isNewRawDataPending (PoolableListener $poolInstance);
+ function isNewRawDataPending ();
/**
* Handles the incoming decoded raw data. This method does not "convert" the
*/
private $fragmenterInstance = NULL;
- /**
- * Decoder instance
- */
- private $decoderInstance = NULL;
-
/**
* Assembler instance
*/
return $this->fragmenterInstance;
}
- /**
- * Setter for decoder instance
- *
- * @param $decoderInstance A Decodeable instance
- * @return void
- */
- protected final function setDecoderInstance (Decodeable $decoderInstance) {
- $this->decoderInstance = $decoderInstance;
- }
-
- /**
- * Getter for decoder instance
- *
- * @return $decoderInstance A Decodeable instance
- */
- protected final function getDecoderInstance () {
- return $this->decoderInstance;
- }
-
/**
* Setter for assembler instance
*
- * @param $assemblerInstance A Decodeable instance
+ * @param $assemblerInstance An instance of an Assembler class
* @return void
*/
protected final function setAssemblerInstance (Assembler $assemblerInstance) {
/**
* Getter for assembler instance
*
- * @return $assemblerInstance A Decodeable instance
+ * @return $assemblerInstance An instance of an Assembler class
*/
protected final function getAssemblerInstance () {
return $this->assemblerInstance;
/**
* Getter for info instance
*
- * @return $infoInstance A Decodeable instance
+ * @return $infoInstance An instance of a ShareableInfo class
*/
public final function getInfoInstance () {
return $this->infoInstance;
socket_clear_error($socketResource);
}
- /**
- * Checks whether the final (last) chunk is valid
- *
- * @param $chunks An array with chunks and (hopefully) a valid final chunk
- * @return $isValid Whether the final (last) chunk is valid
- */
- protected function isValidFinalChunk (array $chunks) {
- // Default is all fine
- $isValid = TRUE;
-
- // Split the (possible) EOP chunk
- $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));
- assert(count($chunkSplits) == 3);
-
- // Validate final chunk
- if (substr($chunkSplits[ChunkHandler::CHUNK_SPLITS_INDEX_RAW_DATA], 0, strlen(PackageFragmenter::END_OF_PACKAGE_IDENTIFIER)) != PackageFragmenter::END_OF_PACKAGE_IDENTIFIER) {
- // Not fine
- $isValid = FALSE;
- } elseif (substr_count($chunkSplits[ChunkHandler::CHUNK_SPLITS_INDEX_RAW_DATA], PackageFragmenter::CHUNK_HASH_SEPARATOR) != 1) {
- // CHUNK_HASH_SEPARATOR shall only be found once
- $isValid = FALSE;
- }
-
- // Return status
- return $isValid;
- }
-
/**
* Translates socket error codes into our own internal names which can be
* used for call-backs.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class PackageDecoder extends BaseDecoder implements Decodeable {
+class PackageDecoder extends BaseDecoder implements Decodeable, Registerable {
/**
* Name for stacker for received packages
*/
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A factory class for Decodeable objects
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class DecoderFactory extends ObjectFactory {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Returns a singleton (registry-based) Decodeable instance
+ *
+ * @return $decoderInstance An instance of a Decodeable class
+ */
+ public static final function createPackageDecoderInstance () {
+ // If there is no handler?
+ if (Registry::getRegistry()->instanceExists('package_decoder')) {
+ // Get handler from registry
+ $decoderInstance = Registry::getRegistry()->getInstance('package_decoder');
+ } else {
+ // Get a chunk handler instance
+ $handlerInstance = ChunkHandlerFactory::createChunkHandlerInstance();
+
+ // Get the handler instance
+ $decoderInstance = self::createObjectByConfiguredName('package_decoder_class', array($handlerInstance));
+
+ // Add it to the registry
+ Registry::getRegistry()->addInstance('package_decoder', $decoderInstance);
+ }
+
+ // Return the instance
+ return $decoderInstance;
+ }
+}
+
+// [EOF]
+?>
* given node instance.
*
* @param $stateName Name of the state
- * @param $nodeInstance A NodeHelper class instance
+ * @param $nodeInstance An instance of a NodeHelper class (optional)
* @return $stateInstance A Stateable class instance
*/
- public static final function createNodeStateInstanceByName ($stateName, NodeHelper $nodeInstance) {
+ public static final function createNodeStateInstanceByName ($stateName, NodeHelper $nodeInstance = NULL) {
// Then construct the class' configuraton entry
$className = 'node_' . $stateName . '_state_class';
+ // Is the node instance set?
+ if (is_null($nodeInstance)) {
+ // Get node instance from registry
+ $nodeInstance = NodeObjectFactory::createNodeInstance();
+ } // END - if
+
// Get a class from that configuration entry
$stateInstance = self::createObjectByConfiguredName($className, array($nodeInstance));
$handlerInstance->registerTask('network_package_writer', $taskInstance);
// Generate package reader task
- $taskInstance = ObjectFactory::createObjectByConfiguredName('node_package_reader_task_class', array($nodeInstance->getListenerPoolInstance()));
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('node_package_reader_task_class');
// Network package reader, needs to be delayed a little
$handlerInstance->registerTask('network_package_reader', $taskInstance);
*/
private $rawPackageData = '';
+ /**
+ * Fragmenter instance, needs to be set here again
+ */
+ private $fragmenterInstance = NULL;
+
/**
* Protected constructor
*
// Initialize handler
$this->initHandler();
+
+ // Get a fragmenter instance for later verification of serial numbers (e.g. if all are received)
+ $fragmenterInstance = FragmenterFactory::createFragmenterInstance('package');
+
+ // Set it in this handler
+ $this->fragmenterInstance = $fragmenterInstance;
}
/**
// ... and set it in this handler
$handlerInstance->setCryptoInstance($cryptoInstance);
- // Get a fragmenter instance for later verification of serial numbers (e.g. if all are received)
- $fragmenterInstance = FragmenterFactory::createFragmenterInstance('package');
-
- // Set it in this handler
- $handlerInstance->setFragmenterInstance($fragmenterInstance);
-
// Return the prepared instance
return $handlerInstance;
}
$finalHash = $this->generateFinalHash(implode('', $this->finalPackageChunks['content']));
// Reset the serial number generator
- $this->getFragmenterInstance()->resetSerialNumber($finalHash);
+ $this->fragmenterInstance->resetSerialNumber($finalHash);
// "Walk" through all (content) chunks
foreach ($this->finalPackageChunks['content'] as $serialNumber => $content) {
// Get next serial number
- $nextSerial = $this->getFragmenterInstance()->getNextHexSerialNumber($finalHash);
+ $nextSerial = $this->fragmenterInstance->getNextHexSerialNumber($finalHash);
// Debug output
//* NOISY-DEBUG */ self::createDebugInstance(__CLASS__)->debugOutput('CHUNK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: serialNumber=' . $serialNumber . ',nextSerial=' . $nextSerial);
assert($finalHash == $this->eopChunk[0]);
}
+ /**
+ * Checks whether the final (last) chunk is valid
+ *
+ * @param $chunks An array with chunks and (hopefully) a valid final chunk
+ * @return $isValid Whether the final (last) chunk is valid
+ */
+ private function isValidFinalChunk (array $chunks) {
+ // Default is all fine
+ $isValid = TRUE;
+
+ // Split the (possible) EOP chunk
+ $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));
+ assert(count($chunkSplits) == 3);
+
+ // Validate final chunk
+ if (substr($chunkSplits[ChunkHandler::CHUNK_SPLITS_INDEX_RAW_DATA], 0, strlen(PackageFragmenter::END_OF_PACKAGE_IDENTIFIER)) != PackageFragmenter::END_OF_PACKAGE_IDENTIFIER) {
+ // Not fine
+ $isValid = FALSE;
+ } elseif (substr_count($chunkSplits[ChunkHandler::CHUNK_SPLITS_INDEX_RAW_DATA], PackageFragmenter::CHUNK_HASH_SEPARATOR) != 1) {
+ // CHUNK_HASH_SEPARATOR shall only be found once
+ $isValid = FALSE;
+ }
+
+ // Return status
+ return $isValid;
+ }
+
/**
* Adds all chunks if the last one verifies as a 'final chunk'.
*
* @return void
*/
public function handleMessageData (array $messageData, Receivable $packageInstance) {
+ // Get node instance
+ $nodeInstance = NodeObjectFactory::createNodeInstance();
+
// Are node id and session id the same?
- if (($messageData[XmlSelfConnectTemplateEngine::SELF_CONNECT_DATA_NODE_ID] == $this->getNodeId()) && ($messageData[XmlSelfConnectTemplateEngine::SELF_CONNECT_DATA_SESSION_ID] == $this->getSessionId())) {
+ if (($messageData[XmlSelfConnectTemplateEngine::SELF_CONNECT_DATA_NODE_ID] == $nodeInstance->getNodeId()) && ($messageData[XmlSelfConnectTemplateEngine::SELF_CONNECT_DATA_SESSION_ID] == $nodeInstance->getSessionId())) {
// Both are equal
self::createDebugInstance(__CLASS__)->debugOutput('SELF-CONNECT[' . __METHOD__ . ':' . __LINE__ . ']: Have connected to myself, both node and session id are equal!');
- // Get node instance ...
- $nodeInstance = NodeObjectFactory::createNodeInstance();
-
// ... and change state
$nodeInstance->getStateInstance()->nodeHasSelfConnected();
} else {
*/
private $universalNodeLocatorData = array();
+ /**
+ * Name of used protocol
+ */
+ private $protocolName = 'invalid';
+
/**
* Protected constructor
*
parent::__construct($className);
}
+ /**
+ * Getter for protocol name
+ *
+ * @return $protocolName Name of used protocol
+ */
+ public final function getProtocolName () {
+ return $this->protocolName;
+ }
+
+ /**
+ * Setter for protocol name
+ *
+ * @param $protocolName Name of used protocol
+ * @return void
+ */
+ protected final function setProtocolName ($protocolName) {
+ $this->protocolName = $protocolName;
+ }
+
/**
* Setter for UNL data array to satify HandleableProtocol
*
* given receiver instance. This method should not be called, please call
* the decorator's version instead to separator node/client traffic.
*
- * @param $receiverInstance An instance of a Receivable class
* @return void
* @throws UnsupportedOperatorException If this method is called by a mistake
*/
- public function monitorIncomingRawData (Receivable $receiverInstance) {
- throw new UnsupportedOperationException(array($this, __FUNCTION__, $receiverInstance), self::EXCEPTION_UNSPPORTED_OPERATION);
+ public function monitorIncomingRawData () {
+ throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
}
}
* Monitors incoming raw data from the handler and transfers it to the
* given receiver instance.
*
- * @param $receiverInstance An instance of a Receivable class
* @return void
*/
- public function monitorIncomingRawData (Receivable $receiverInstance) {
+ public function monitorIncomingRawData () {
// Get the handler instance
$handlerInstance = $this->getListenerInstance()->getHandlerInstance();
return;
} // END - if
+ // Get receiver (network package) instance
+ $receiverInstance = NetworkPackageFactory::createNetworkPackageInstance();
+
/*
* We have some pending decoded data. The receiver instance is an
* abstract network package (which can be received and sent out) so
$packageInstance->initStacks();
// Get a visitor instance for speeding up things and set it
- $visitorInstance = ObjectFactory::createObjectByConfiguredName('node_raw_data_monitor_visitor_class', array($packageInstance));
+ $visitorInstance = ObjectFactory::createObjectByConfiguredName('node_raw_data_monitor_visitor_class');
$packageInstance->setVisitorInstance($visitorInstance);
// Get crypto instance and set it, too
$assemblerInstance = PackageAssemblerFactory::createAssemblerInstance($packageInstance);
$packageInstance->setAssemblerInstance($assemblerInstance);
+ // Get node instance
+ $nodeInstance = NodeObjectFactory::createNodeInstance();
+
+ // Get pool instance from node
+ $poolInstance = $nodeInstance->getListenerPoolInstance();
+
+ // And set it here
+ $packageInstance->setListenerPoolInstance($poolInstance);
+
// Return the prepared instance
return $packageInstance;
}
/**
* Checks whether new raw package data has arrived at a socket
*
- * @param $poolInstance An instance of a PoolableListener class
* @return $hasArrived Whether new raw package data has arrived for processing
*/
- public function isNewRawDataPending (PoolableListener $poolInstance) {
+ public function isNewRawDataPending () {
// Visit the pool. This monitors the pool for incoming raw data.
- $poolInstance->accept($this->getVisitorInstance());
+ $this->getListenerPoolInstance()->accept($this->getVisitorInstance());
// Check for new data arrival
$hasArrived = $this->isRawDataPending();
parent::__construct(__CLASS__);
// Set prefix to "HubConsole"
- $this->setClassPrefix('HubConsole');
+ $this->setClassPrefix('hub_console');
}
/**
/**
* Creates an instance of this class
*
- * @param $nodeInstance An instance of a NodeHelper class
* @return $stateInstance An instance of a Stateable class
*/
- public static final function createNodeActiveState (NodeHelper $nodeInstance) {
+ public static final function createNodeActiveState () {
// Get new instance
$stateInstance = new NodeActiveState();
- // Enable isActive flag in node instance
- $nodeInstance->enableIsActive();
-
- // Set the node instance
- $stateInstance->setNodeInstance($nodeInstance);
+ // Get node instance and set 'active' flag
+ NodeObjectFactory::createNodeInstance()->enableIsActive();
// Return the prepared instance
return $stateInstance;
*/
public function nodeAnnouncingToUpperHubs () {
// Create the new state instance
- NodeStateFactory::createNodeStateInstanceByName('announcing', $this->getNodeInstance());
+ NodeStateFactory::createNodeStateInstanceByName('announcing');
}
/**
*/
public function nodeHasSelfConnected () {
// Create the new state instance
- NodeStateFactory::createNodeStateInstanceByName('reachable', $this->getNodeInstance());
+ NodeStateFactory::createNodeStateInstanceByName('reachable');
}
}
/**
* Creates an instance of this class
*
- * @param $nodeInstance An instance of a NodeHelper class
* @return $stateInstance An instance of a Stateable class
*/
- public static final function createNodeAnnouncementCompletedState (NodeHelper $nodeInstance) {
+ public static final function createNodeAnnouncementCompletedState () {
// Get new instance
$stateInstance = new NodeAnnouncementCompletedState();
- // Set the node instance
- $stateInstance->setNodeInstance($nodeInstance);
-
// Return the prepared instance
return $stateInstance;
}
/**
* Creates an instance of this class
*
- * @param $nodeInstance An instance of a NodeHelper class
* @return $stateInstance An instance of a Stateable class
*/
- public static final function createNodeAnnouncingState (NodeHelper $nodeInstance) {
+ public static final function createNodeAnnouncingState () {
// Get new instance
$stateInstance = new NodeAnnouncingState();
- // Set the node instance
- $stateInstance->setNodeInstance($nodeInstance);
-
// Return the prepared instance
return $stateInstance;
}
*/
public function nodeAnnouncementSuccessful () {
// The node's announcement was successful
- NodeStateFactory::createNodeStateInstanceByName('announcement_completed', $this->getNodeInstance());
+ NodeStateFactory::createNodeStateInstanceByName('announcement_completed');
}
}
/**
* Creates an instance of this class
*
- * @param $nodeInstance An instance of a NodeHelper class
* @return $stateInstance An instance of a Stateable class
*/
- public static final function createNodeInitState (NodeHelper $nodeInstance) {
+ public static final function createNodeInitState () {
// Get new instance
$stateInstance = new NodeInitState();
- // Set the node instance
- $stateInstance->setNodeInstance($nodeInstance);
-
// Return the prepared instance
return $stateInstance;
}
*/
public function nodeGeneratedSessionId () {
// Create the new state instance
- NodeStateFactory::createNodeStateInstanceByName('virgin', $this->getNodeInstance());
+ NodeStateFactory::createNodeStateInstanceByName('virgin');
}
}
/**
* Creates an instance of this class
*
- * @param $nodeInstance An instance of a NodeHelper class
* @return $stateInstance An instance of a Stateable class
*/
- public final static function createNodeReachableState (NodeHelper $nodeInstance) {
+ public final static function createNodeReachableState () {
// Get new instance
$stateInstance = new NodeReachableState();
- // Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE-STATE: Has changed from ' . $nodeInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.');
-
- // Set the node instance
- $stateInstance->setNodeInstance($nodeInstance);
-
// Return the prepared instance
return $stateInstance;
}
*/
public function nodeAnnouncingToUpperHubs () {
// Create the new state instance
- NodeStateFactory::createNodeStateInstanceByName('announcing', $this->getNodeInstance());
+ NodeStateFactory::createNodeStateInstanceByName('announcing');
}
}
/**
* Creates an instance of this class
*
- * @param $nodeInstance An instance of a NodeHelper class
* @return $stateInstance An instance of a Stateable class
*/
- public static final function createNodeVirginState (NodeHelper $nodeInstance) {
+ public static final function createNodeVirginState () {
// Get new instance
$stateInstance = new NodeVirginState();
- // Set the node instance
- $stateInstance->setNodeInstance($nodeInstance);
-
// Return the prepared instance
return $stateInstance;
}
*/
public function nodeIsActivated () {
// Create the new state instance
- NodeStateFactory::createNodeStateInstanceByName('active', $this->getNodeInstance());
+ NodeStateFactory::createNodeStateInstanceByName('active');
}
}
/**
* Creates an instance of this class
*
- * @param $poolInstance An instance of a PoolableListener class
* @return $taskInstance An instance of a Taskable/Visitable class
*/
- public static final function createNetworkPackageReaderTask (PoolableListener $poolInstance) {
+ public static final function createNetworkPackageReaderTask () {
// Get new instance
$taskInstance = new NetworkPackageReaderTask();
- // Set the listener instance here
- $taskInstance->setListenerPoolInstance($poolInstance);
-
- // Get a singleton network package instance
- $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
-
- // And set it in this task
- $taskInstance->setPackageInstance($packageInstance);
-
// Return the prepared instance
return $taskInstance;
}
*/
public function executeTask () {
// "Cache" package instance
- $packageInstance = $this->getPackageInstance();
+ $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
// Do we have something to handle?
if ($packageInstance->isProcessedMessagePending()) {
* Some raw data contained multiple messages which where now splitted.
*/
$packageInstance->handleMultipleMessages();
- } elseif ($packageInstance->isNewRawDataPending($this->getListenerPoolInstance())) {
+ } elseif ($packageInstance->isNewRawDataPending()) {
// Raw, decoded data has been received
$packageInstance->handleIncomingDecodedData();
} elseif ($packageInstance->ifAssemblerHasPendingDataLeft()) {
// Get new instance
$taskInstance = new NetworkPackageWriterTask();
- // Get a singleton network package instance
- $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
-
- // And set it in this task
- $taskInstance->setPackageInstance($packageInstance);
-
// Return the prepared instance
return $taskInstance;
}
*/
public function executeTask () {
// "Cache" package instance
- $packageInstance = $this->getPackageInstance();
+ $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
// Do we have something to deliver?
if ($packageInstance->isEncodedDataPending()) {
// Get new instance
$taskInstance = new NodePackageDecoderTask();
- // Get a chunk handler instance
- $handlerInstance = ChunkHandlerFactory::createChunkHandlerInstance();
-
- // Get a decoder instance
- $decoderInstance = ObjectFactory::createObjectByConfiguredName('package_decoder_class', array($handlerInstance));
-
- // ... and also set the decoder instance here
- $taskInstance->setDecoderInstance($decoderInstance);
-
// Return the prepared instance
return $taskInstance;
}
* @return void
*/
public function executeTask () {
- // "Cache" decoder instance
- $decoderInstance = $this->getDecoderInstance();
+ // Get a decoder instance
+ $decoderInstance = DecoderFactory::createPackageDecoderInstance();
// Check if the stacker has some entries left
if ($decoderInstance->ifUnhandledRawPackageDataLeft()) {
* @param $receiverInstance An instance of a Receivable class
* @return $visitorInstance An instance of a Visitorable class
*/
- public final static function createRawDataPoolMonitorVisitor (Receivable $receiverInstance) {
+ public final static function createRawDataPoolMonitorVisitor () {
// Get new instance
$visitorInstance = new RawDataPoolMonitorVisitor();
- // Set the receiver instance
- $visitorInstance->setReceiverInstance($receiverInstance);
-
// Return the prepared instance
return $visitorInstance;
}
public function visitDecorator (BaseDecorator $decoratorInstance) {
// Do monitor here
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting ' . $listenerInstance->__toString() . ' - CALLED!');
- $decoratorInstance->monitorIncomingRawData($this->getReceiverInstance());
+ $decoratorInstance->monitorIncomingRawData();
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ' ]: Visiting ' . $listenerInstance->__toString() . ' - FINISH');
}
}