[Solar-svn] Revision 3091

pmjones at solarphp.com pmjones at solarphp.com
Thu Apr 10 18:11:14 CDT 2008


Solar_Sql_Model_Record: [BRK] Method locale() now addresses the **model** locale strings.  This helps keep locale string with the model class, not the record class.


Modified: trunk/Solar/Sql/Model/Record.php
===================================================================
--- trunk/Solar/Sql/Model/Record.php	2008-04-10 14:57:13 UTC (rev 3090)
+++ trunk/Solar/Sql/Model/Record.php	2008-04-10 23:11:13 UTC (rev 3091)
@@ -264,6 +264,26 @@
     
     /**
      * 
+     * Overrides normal locale() to use the **model** locale strings.
+     * 
+     * @param string $key The key to get a locale string for.
+     * 
+     * @param string $num If 1, returns a singular string; otherwise, returns
+     * a plural string (if one exists).
+     * 
+     * @param array $replace An array of replacement values for the string.
+     * 
+     * @return string The locale string, or the original $key if no
+     * string found.
+     * 
+     */
+    public function locale($key, $num = 1, $replace = null)
+    {
+        return $this->_model->locale($key, $num, $replace);
+    }
+    
+    /**
+     * 
      * Loads the struct with data from an array or another struct.
      * 
      * Also unserializes columns per the "serialize_cols" model property.




More information about the Solar-svn mailing list