[TYPO3-core] Wrapper methods around globals?
dmitry.dulepov at gmail.com
Thu Apr 3 08:54:19 CEST 2014
François Suter wrote:
> In a patch I submitted this morning , I added a wrapper method around
> $GLOBALS['BE_USER'], because it makes it much easier to work with such
> globals in an IDE, having type hinting and code completion. I did it
> because I saw other places in the Core using this way of doing this.
> Now Kay Strobach thinks this should not be done for performance reasons.
I do not think that a function call to return a variable vs access the
variable directly would be comparable in performance impact to any of
hundreds useless database calls we do during user auth for each request.
So, I say, go for your change. It is useful.
Today is a good day to have a good day.
More information about the TYPO3-team-core