[Solar-svn] Revision 3261
pmjones at solarphp.com
pmjones at solarphp.com
Sun Jul 27 10:59:47 CDT 2008
Solar_Inflect: [CHG] Rename "dash" methods to "dashes".
Modified: trunk/Solar/Inflect.php
===================================================================
--- trunk/Solar/Inflect.php 2008-07-27 15:01:34 UTC (rev 3260)
+++ trunk/Solar/Inflect.php 2008-07-27 15:59:47 UTC (rev 3261)
@@ -291,7 +291,7 @@
* @return string The word in camel-caps.
*
*/
- public function dashToCamel($str)
+ public function dashesToCamel($str)
{
$str = ucwords(str_replace('-', ' ', $str));
$str = str_replace(' ', '', $str);
@@ -324,9 +324,9 @@
* @return string The word in studly-caps.
*
*/
- public function dashToStudly($str)
+ public function dashesToStudly($str)
{
- $str = $this->dashToCamel($str);
+ $str = $this->dashesToCamel($str);
$str[0] = strtoupper($str[0]);
return $str;
}
@@ -356,11 +356,11 @@
* @return string The word with dashes in place of camel caps.
*
*/
- public function camelToDash($str)
+ public function camelToDashes($str)
{
$str = preg_replace('/([a-z])([A-Z])/', '$1 $2', $str);
$str = str_replace(' ', '-', ucwords($str));
- return $str;
+ return strtolower($str);
}
/**
More information about the Solar-svn
mailing list