/**
* "Getter" to get a string respresentation of the protocol
*
- * @param $connectionInstance An instance of a ConnectionHelper class
- * @return $key A string representation of the protocol for the registry
+ * @param $infoInstance An instance of a ShareableInfo class
+ * @return $key A string representation of the protocol for the registry
*/
- private function getRegistryKeyFromConnection (ConnectionHelper $connectionInstance) {
+ private function getRegistryKeyFromInfo (ShareableInfo $infoInstance) {
// Get the key
- $key = $connectionInstance->getProtocolName();
+ $key = $infoInstance->getProtocolName();
// Return resulting key
return $key;
/**
* Checks whether the given protocol is registered
*
- * @param $connectionInstance An instance of a ConnectionHelper class
- * @return $isRegistered Whether the protocol is registered
+ * @param $connectionInstance An instance of a ConnectionHelper class
+ * @return $isRegistered Whether the protocol is registered
*/
private function isConnectionRegistered (ConnectionHelper $connectionInstance) {
// Get the key
- $key = $this->getRegistryKeyFromConnection($connectionInstance);
+ $key = $this->getRegistryKeyFromInfo($connectionInstance);
// Determine it
$isRegistered = $this->instanceExists($key);
// First, check for the instance, there can be only once
if ($this->isConnectionRegistered($connectionInstance)) {
// That one is found so "get" a registry key from it
- $key = $this->getRegistryKeyFromConnection($connectionInstance);
+ $key = $this->getRegistryKeyFromInfo($connectionInstance);
// Get the registry
$registryInstance = $this->getInstance($key);
$registryInstance = SubRegistry::createSubRegistry();
// Now we can create the sub-registry for this protocol
- $this->addInstance($this->getRegistryKeyFromConnection($connectionInstance), $registryInstance);
+ $this->addInstance($this->getRegistryKeyFromInfo($connectionInstance), $registryInstance);
} else {
// Get the sub-registry back
- $registryInstance = $this->getInstance($this->getRegistryKeyFromConnection($connectionInstance));
+ $registryInstance = $this->getInstance($this->getRegistryKeyFromInfo($connectionInstance));
}
// Get a key for sub-registries
} // END - if
// Now get the key from the protocol
- $key = $this->getRegistryKeyFromConnection($connectionInstance);
+ $key = $this->getRegistryKeyFromInfo($connectionInstance);
// And get the registry
$registryInstance = $this->getInstance($key);
// Get all keys and check them
foreach ($this->getInstanceRegistry() as $key => $registryInstance) {
+ // Debug message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: key=' . $key . ',registryInstance=' . $registryInstance->__toString());
+
// This is always a SubRegistry instance
foreach ($registryInstance->getInstanceRegistry() as $subKey => $containerInstance) {
// Debug message