// Debug output
$tableInstance->debugOutput('PEER-STATE-FACTORY: errorCode=' . $errorCode);
- // Is a new peer so create the state instance based on error code, first we need a config entry
- $configEntry = 'peer_' . $errorCode . '_state_class';
-
// Register the new peer with its session id
$tableInstance->registerPeerByPackageData($packageData, $socketResource);
- // Then get it
- $stateInstance = self::createObjectByConfiguredName($configEntry);
+ /*
+ * It is a new peer so create the state instance based on error
+ * code and get an instance from it.
+ */
+ $stateInstance = self::createObjectByConfiguredName('peer_' . $errorCode . '_state_class');
// And register it with the lookup table
$tableInstance->registerPeerState($stateInstance, $packageData);