Bug #20359
closedConversion from camelcase to underscores, and back
0%
Description
Problem:
With Extbase, we introduced a new naming convention for extensions. Example: The extension with key "blog_example" will have Tx_BlogExample as prefix for all PHP classes. We need some way to convert between camelcased and underscored versions - that's what this patch provides in t3lib_div.
The same functionality is also needed in Extbase to convert from database tables to property names.
Solution:
Add a few functions to t3lib_div:
- underscoredToUpperCamelCase
- underscoredToLowerCamelCase
- camelCaseToLowerCaseUnderscored
- lowercaseFirst (lowercase first character)
Notes:
This patch is part of a patch series to implement the autoloader. The patches have been worked out together with Olly.
The functionality of this patch has been taken from extbase and implemented by Jochen Rau.
(issue imported from #M10985)
Files
Updated by Ingo Renner over 15 years ago
note: wouldn't it be better to put these methods in a t3lib_string or t3lib_util_string class?