[TYPO3-dev] Abbreviations in class/file names
Helmut Hummel
helmut.hummel at typo3.org
Thu Jul 24 08:38:36 CEST 2014
Hi Bernahrd!
On 23.07.14 17:05, Bernhard Kraft wrote:
> Usually an abbreviation (protocols,
> etc.) are all uppercase. Is this somehow handled in the autoloader or
> would I simply have to name the file "RetrieveFileImap" ??
The class loader basically maps all namespace parts to path parts, while
the casing is kept (for any namespace part after vendor and extension):
\MyVendor\MyExtension\Task\RetrieveFileImap
is resolved to:
typo3conf/ext/my_extension/Classes/Task/RetrieveFileImap.php
\MyVendor\MyExtension\Task\RetrieveFileIMAP
is resolved to:
typo3conf/ext/my_extension/Classes/Task/RetrieveFileIMAP.php
\MyVendor\MyExtension\FOO\BAR\bAz
is resolved to:
typo3conf/ext/my_extension/Classes/FOO/BAR/bAz.php
> I have seen things like "core/Classes/Utility/HttpUtility.php" which is
> wrong in my eyes. HTTP should be all uppercase.
It is a matter of taste. I also do not like it very much but I
understand and enjoy the consistency in this CGL rule. (I never have to
ask myself how to deal with casing, thus it is faster and less error prone)
Kind regards,
Helmut
--
Helmut Hummel
Release Manager TYPO3 6.0
TYPO3 Core Developer, TYPO3 Security Team Member
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the TYPO3-dev
mailing list