[TYPO3-core] RFC: Feature #10985: Conversion from camelcase to underscores, and back

Sebastian KurfŸürst sebastian at typo3.org
Sun Apr 26 15:50:20 CEST 2009


This is an SVN patch request.

Type: Feature

BT Reference: http://bugs.typo3.org/view.php?id=10985

Branch: trunk

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.

Greets,
Sebastian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: extbase-t3libdiv.patch
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090426/08cd351f/attachment.txt 


More information about the TYPO3-team-core mailing list