[TYPO3-dev] Annoyed by the use of $GLOBALS['TYPO3_DB']
Benjamin Mack
benni at typo3.org
Sun Sep 21 05:36:21 CEST 2008
Hey Dmitry,
Dmitry Dulepov [typo3] wrote:
> Hi!
>
> Benjamin Mack wrote:
>> when I'm developing extensions, I find it very annoying to use
>> $GLOBALS['TYPO3_DB'] all the time, and it makes the code not so
>> readable anymore.
>>
>> What do you think of having a reference to the $GLOBALS['TYPO3_DB'] in
>> every instance of pi_base? Similar to what we have with div/lib...
>
> I do not like that. If this is done, every other class will like to have
> his own reference. -1. Don't be lazy ;)
Well, I think that there is a difference between tslib_pibase and e.g.
tslib_content (and most other classes). tslib_pibase is what extdevs
need to create their own FE plugins, as they're subclassing this class
and can use this "feature" out of the box. On all the other cases
$GLOBALS['TYPO3_DB'] is still fine.
Just trying to lowering the barrier to TYPO3 extension developing here...
--
All the best,
benni.
-SDG-
More information about the TYPO3-dev
mailing list