[TYPO3-core] Central classes for naming conventions

Sebastian Michaelsen sebastian.michaelsen at t3seo.de
Tue Sep 11 14:49:11 CEST 2012


Hi *,

after thinking a bit about #40742 where Extbase fails to resolve the 
correct database table name for a given class name I came to the idea 
that it would be nice if all the naming conventions and conversions were 
centralized in one or a few classes.

I think of it like this:

namespace \TYPO3\CMS\Core\Nomenclature;

ClassName::getClassNameWithoutVendorAndProduct($className)
ClassName::getExtensionKey($className)
ClassName::getVendor($className)
Extension::getExtensionName($extKey)
ModelObject::getTableName($className)
ModelPropery::getDatabaseFieldName($propertyName)

(the details are to be discussed of course)

At the moment all the naming conventions are not really explicitly 
represented in the code. There are lines like

$extKey = 
\TYPO3\CMS\Core\Utility\GeneralUtility::camelCaseToLowerCaseUnderscored($extensionName);

all over the core.

This step would make the naming conventions more solid and less error 
prone in my opinion.

What do you think? If you agree, is it possible/wise to still get this 
into 6.0 after feature freeze?

kind regards,
Sebastian


More information about the TYPO3-team-core mailing list