]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/listener/class_BaseListener.php
Exceptions, interfaces and many classes added/rewritten:
[hub.git] / application / hub / main / listener / class_BaseListener.php
index f06b7f25982acce827d1e8303d19be8d729e9cf3..0fce415d1de27246053ca13ea3582883f8cbffdf 100644 (file)
@@ -199,6 +199,26 @@ class BaseListener extends BaseHubSystem implements Visitable {
        protected final function getPoolInstance () {
                return $this->poolInstance;
        }
+
+       /**
+        * Accepts the visitor to rpocess the visit "request"
+        *
+        * @param       $visitorInstance        An instance of a Visitor class
+        * @return      void
+        */
+       public function accept (Visitor $visitorInstance) {
+               // Debug message
+               $this->debugOutput('LISTENER: ' . $visitorInstance->__toString() . ' has visited - START');
+
+               // Visit this listener
+               $visitorInstance->visitListener($this);
+
+               // Visit the pool
+               $this->getPoolInstance()->accept($visitor);
+
+               // Debug message
+               $this->debugOutput('LISTENER: ' . $visitorInstance->__toString() . ' has visited - FINISHED');
+       }
 }
 
 // [EOF]