[TYPO3-core] Use "namespace" directive for relative namespaces
Bernhard Kraft
kraft at web-consulting.at
Mon Feb 25 13:28:37 CET 2013
Hello,
I would like to ask if there is some effort or interest to use the
"namespace" directive of PHP in the TYPO3 core:
http://www.php.net/manual/en/language.namespaces.basics.php
For example in "sysext/cms/index_ts.php": Instead of prefixing EVERY
call to \TYPO3\CMS\Core\... with this prefix we could declare a
namespace for this file at the top:
namespace \TYPO3\CMS\Core;
And then simply use "Utility\MathUtility" or "Utility\GeneralUtility".
I guess this would make the code a little more readable. Similar to the
"import" statements at the top of a java class.
greetings,
Bernhard
More information about the TYPO3-team-core
mailing list