[TYPO3-dev] Annoyed by the use of $GLOBALS['TYPO3_DB']

Dmitry Dulepov [typo3] dmitry at typo3.org
Sun Sep 21 10:28:35 CEST 2008


Hi!

Benjamin Mack wrote:
> 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.

I think $GLOBALS['TYPO3_DB'] is fine in all cases.

> Just trying to lowering the barrier to TYPO3 extension developing here...

This is not a barrier at all. tslib_pibase consists from old functions and needs a major rewrite. Adding a reference there will not solve any problem but will cause questions about different between $GLOBALS['TYPO3_DB'] and $this->DB. I am strongly against such references. They do not add any value but create confusion.

If you want to lower the barrier, then provide better functions inside pibase. This would be a real achievement. For example, link functions currently do not provide caching and they are very limited in general. There should be something as flexible as typolink() but without a need to make $conf before the call.

-- 
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/post-details/tag_your_typo3_extension_releases_in_svn/




More information about the TYPO3-dev mailing list