[Solar-svn] Revision 2572

pmjones at solarphp.com pmjones at solarphp.com
Tue Jul 10 09:37:01 CDT 2007


Solar_Controller_Page: [ADD] Allow injection of the front-controller, based on an idea by Rodrigo Moraes


Modified: trunk/Solar/Controller/Page.php
===================================================================
--- trunk/Solar/Controller/Page.php	2007-07-05 17:52:42 UTC (rev 2571)
+++ trunk/Solar/Controller/Page.php	2007-07-10 14:37:01 UTC (rev 2572)
@@ -270,6 +270,15 @@
     
     /**
      * 
+     * The front-controller object (if any) that invoked this page-controller.
+     * 
+     * @var Solar_Controller_Front
+     * 
+     */
+    protected $_front;
+    
+    /**
+     * 
      * Maps format name keys to Content-Type values.
      * 
      * When $this->_format matches one of the keys, the controller will set
@@ -381,6 +390,20 @@
     
     /**
      * 
+     * Injects the front-controller object that invoked this page-controller.
+     * 
+     * @param Solar_Controller_Front $front The front-controller.
+     * 
+     * @return void
+     * 
+     */
+    public function setFrontController($front)
+    {
+        $this->_front = $front;
+    }
+    
+    /**
+     * 
      * Executes the requested action and returns its output with layout.
      * 
      * If an exception is thrown during the fetch() process, it is caught




More information about the Solar-svn mailing list