]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/filter/console/class_ConsoleWelcomeTeaserFilter.php
Filter for node initialization added, more preparation for intercepting filter pattern
[hub.git] / application / hub / main / filter / console / class_ConsoleWelcomeTeaserFilter.php
index 1f889d0c0fd9d8240f36d059abb0529ff4e521f0..7f65b323c7712a36f8e6f8679c819effa6915539 100644 (file)
@@ -51,11 +51,20 @@ class ConsoleWelcomeTeaserFilter extends BaseFilter implements Filterable {
         * @param       $requestInstance        An instance of a class with an Requestable interface
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
-        * @todo        0% done
+        * @throws      FilterChainException    If the nodeInstance was not set
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
-               // Implement this!
-               $this->partialStub("Please implement this method.");
+               // Get node instance
+               $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+               // Sanity-check on it
+               if (is_null($nodeInstance)) {
+                       // Throws a FilterChainException to stop further processing
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
+               } // END - if
+
+               // Now output the teaser
+               $nodeInstance->outputConsoleTeaser();
        }
 }