+
+ /**
+ * Accepts the visitor to process the visit "request"
+ *
+ * @param $visitorInstance An instance of a Visitor class
+ * @return void
+ */
+ public function accept (Visitor $visitorInstance) {
+ // Debug message
+ //* NOISY-DEBUG: */ $this->debugOutput('PACKAGE: ' . $visitorInstance->__toString() . ' has visited - START');
+
+ // Visit the package
+ $visitorInstance->visitNetworkPackage($this);
+
+ // Debug message
+ //* NOISY-DEBUG: */ $this->debugOutput('PACKAGE: ' . $visitorInstance->__toString() . ' has visited - FINISHED');
+ }
+
+ /**
+ * Clears all stacks
+ *
+ * @return void
+ */
+ public function clearAllStacks () {
+ // Do the cleanup (no flushing)
+ foreach (
+ array(
+ self::STACKER_NAME_UNDECLARED,
+ self::STACKER_NAME_DECLARED,
+ self::STACKER_NAME_OUTGOING,
+ self::STACKER_NAME_DECODED_INCOMING,
+ self::STACKER_NAME_DECODED_HANDLED,
+ self::STACKER_NAME_BACK_BUFFER
+ ) as $stackerName) {
+ // Clear this stacker by forcing an init
+ $this->getStackerInstance()->initStacker($stackerName, true);
+ } // END - foreach
+
+ // Debug message
+ /* DEBUG: */ $this->debugOutput('PACKAGE: All stackers has be re-initialized.');
+ }