[TYPO3-core] Central classes for naming conventions
Nicole Cordes
cordes at cps-it.de
Tue Sep 11 15:05:12 CEST 2012
Hi Sebastian,
just my thought but I think it might be enought to get a function for the
current class in ExtensionManager.
getClassNameWithoutVendorAndProduct($className)
This is already written in the Autoloader but may be refectored in an own
function. So Extbase could make use of it.
Cheers,
Nicole
-----Ursprüngliche Nachricht-----
Von: typo3-team-core-bounces at lists.typo3.org
[mailto:typo3-team-core-bounces at lists.typo3.org] Im Auftrag von Sebastian
Michaelsen
Gesendet: Dienstag, 11. September 2012 14:49
An: typo3-team-core at lists.typo3.org
Betreff: [TYPO3-core] Central classes for naming conventions
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($ext
ensionName);
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
_______________________________________________
Before posting to this list, please have a look to the posting rules on the
following websites:
http://typo3.org/teams/core/core-mailinglist-rules/
http://typo3.org/development/bug-fixing/diff-and-patch/
_______________________________________________
TYPO3-team-core mailing list
TYPO3-team-core at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core
More information about the TYPO3-team-core
mailing list