Author: david
Date: Tue Jan 10 09:43:34 2012
New Revision: 10608
Log:
Add camelize method for converting row headers to standard camelized form
Modified:
trunk/lib/QubitFlatfileImport.class.php
Modified: trunk/lib/QubitFlatfileImport.class.php
==============================================================================
--- trunk/lib/QubitFlatfileImport.class.php Tue Jan 10 09:39:37 2012
(r10607)
+++ trunk/lib/QubitFlatfileImport.class.php Tue Jan 10 09:43:34 2012
(r10608)
@@ -542,4 +542,21 @@
{
return ($oldContent) ? $oldContent ."\n". $newContent : $newContent;
}
+
+ /**
+ * Convert human readable (e.g. 'This string') strings to camelCase
+ * representation (e.g. 'thisString')
+ *
+ * @param string $str input string
+ *
+ * @return string camelCase string
+ */
+ public static function camelize($str)
+ {
+ $str = str_replace(' ', '_', $str);
+ $str = sfInflector::camelize($str);
+ $str = lcfirst($str);
+
+ return $str;
+ }
}
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.