From: Roland Häder Date: Tue, 7 Aug 2012 16:13:14 +0000 (+0000) Subject: Renamed some methods to make them more clear X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=295585de20af0565525546616a38424322225394;p=hub.git Renamed some methods to make them more clear --- diff --git a/application/hub/interfaces/package/class_Receivable.php b/application/hub/interfaces/package/class_Receivable.php index 821c8178e..3022572e1 100644 --- a/application/hub/interfaces/package/class_Receivable.php +++ b/application/hub/interfaces/package/class_Receivable.php @@ -37,7 +37,7 @@ interface Receivable extends FrameworkInterface { * * @return void */ - function handleIncomingRawData (); + function handleIncomingDecodedData (); /** * Checks whether incoming decoded data is handled. @@ -52,7 +52,7 @@ interface Receivable extends FrameworkInterface { * * @return void */ - function assembleRawDataToPackage (); + function assembleDecodedDataToPackage (); /** * Checks whether a new message has arrived diff --git a/application/hub/main/package/assembler/class_PackageAssembler.php b/application/hub/main/package/assembler/class_PackageAssembler.php index 641204f23..de0148813 100644 --- a/application/hub/main/package/assembler/class_PackageAssembler.php +++ b/application/hub/main/package/assembler/class_PackageAssembler.php @@ -130,14 +130,13 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable **************************************************************************/ /** - * Call-back handler to handle unhandled packages. This method "explodes" - * the string with the chunk separator from PackageFragmenter class, does - * some low checks on it and feeds it into another queue for verification - * and re-request for bad chunks. + * Call-back handler to handle unhandled package data. This method + * "explodes" the string with the chunk separator from PackageFragmenter + * class, does some low checks on it and feeds it into another queue for + * verification and re-request for bad chunks. * * @param $packageContent An array with two elements: 'raw_data' and 'error_code' * @return void - * @throws FinalChunkVerificationException If the final chunk does not start with 'EOP:' */ private function handlePackageByUnhandledPackage (array $packageContent) { // Debug message diff --git a/application/hub/main/package/class_NetworkPackage.php b/application/hub/main/package/class_NetworkPackage.php index 81f262119..d0e072087 100644 --- a/application/hub/main/package/class_NetworkPackage.php +++ b/application/hub/main/package/class_NetworkPackage.php @@ -802,7 +802,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R * * @return void */ - public function handleIncomingRawData () { + public function handleIncomingDecodedData () { /* * This method should only be called if decoded raw data is pending, * so check it again. @@ -907,11 +907,11 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R * * @return void */ - public function assembleRawDataToPackage () { + public function assembleDecodedDataToPackage () { // Make sure the raw decoded package data is handled assert($this->isIncomingRawDataHandled()); - // Get current package content (an array with two elements; see handleIncomingRawData() for details) + // Get current package content (an array with two elements; see handleIncomingDecodedData() for details) $packageContent = $this->getStackerInstance()->getNamed(self::STACKER_NAME_DECODED_HANDLED); // Start assembling the raw package data array by chunking it diff --git a/application/hub/main/tasks/network/class_NetworkPackageReaderTask.php b/application/hub/main/tasks/network/class_NetworkPackageReaderTask.php index 8f7971ea6..4a9537d5b 100644 --- a/application/hub/main/tasks/network/class_NetworkPackageReaderTask.php +++ b/application/hub/main/tasks/network/class_NetworkPackageReaderTask.php @@ -96,10 +96,10 @@ class NetworkPackageReaderTask extends BaseTask implements Taskable, Visitable { * be assembled back to a "package array". Please see NetworkPackage * for further details (what array elements are required et cetera). */ - $this->getPackageInstance()->assembleRawDataToPackage(); + $this->getPackageInstance()->assembleDecodedDataToPackage(); } elseif ($this->getPackageInstance()->isNewRawDataPending($this->getListenerPoolInstance())) { // Raw, decoded data has been received - $this->getPackageInstance()->handleIncomingRawData(); + $this->getPackageInstance()->handleIncomingDecodedData(); } elseif ($this->getPackageInstance()->ifAssemblerHasPendingDataLeft()) { // Handle any pending data from the package assembler $this->getPackageInstance()->handleAssemblerPendingData();