Project

General

Profile

Actions

Bug #20359

closed

Conversion from camelcase to underscores, and back

Added by Sebastian Kurfuerst over 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2009-04-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

extbase-t3libdiv.patch (2.25 KB) extbase-t3libdiv.patch Administrator Admin, 2009-04-26 15:47
0010985_v2.patch (3.99 KB) 0010985_v2.patch Administrator Admin, 2009-05-01 16:10
Actions #1

Updated by Oliver Hader over 15 years ago

Committed to SVN Trunk (rev. 5384)

Actions #2

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?

Actions

Also available in: Atom PDF