[Solar-svn] Revision 3009

pmjones at solarphp.com pmjones at solarphp.com
Mon Mar 17 20:31:33 CDT 2008


Solar_App_Base: [ADD] Convenience method _error() to set the action to 'error' and add a translated error message.


Modified: trunk/Solar/App/Base.php
===================================================================
--- trunk/Solar/App/Base.php	2008-03-18 01:28:37 UTC (rev 3008)
+++ trunk/Solar/App/Base.php	2008-03-18 01:31:33 UTC (rev 3009)
@@ -242,6 +242,22 @@
     
     /**
      * 
+     * Use this to set the action to "error" with a locale key to be
+     * translated.
+     * 
+     * @param string $locale_key The error-message locale key.
+     * 
+     * @return void
+     * 
+     */
+    protected function _error($locale_key)
+    {
+        $this->_action = 'error';
+        $this->errors[] = $this->locale($locale_key);
+    }
+    
+    /**
+     * 
      * Shows the "exception during fetch" page.
      * 
      * @param Exception $e The exception encountered during fetch().




More information about the Solar-svn mailing list