Core API
3.2. General functions
There are a few core classes in TYPO3 which contain general functionality. These classes are (typically) just a collection of individual functions you call non-instantiated, like [class name]::[method name].
These are the most important classes to know about in TYPO3:
|
Class name: |
Description: |
Usage: |
|---|---|---|
|
t3lib_DB |
Database Abstraction Base API All access to the database must go through this object. That is the first step towards DBAL compliance in your code. The class contains MySQL wrapper functions which can almost be search/replaced with your existing calls. |
$GLOBALS['TYPO3_DB'] in both frontend and backend |
|
t3lib_cs |
Character Set handling API Contains native PHP code to handle character set conversion based on charset tables from Unicode.org. It is not certain that you will have to use this class directly but if you need to do charset conversion at any time you should use this class. |
In backend, $GLOBALS['LANG']->csConvObj In frontend, $GLOBALS['TSFE']->csConvObj |
|
t3lib_div |
General Purpose Functions A collection of multi-purpose PHP functions. Some are TYPO3 specific but not all. |
t3lib_div:: (Non-instantiated!) |
|
t3lib_BEfunc |
Backend Specific Functions Contains functions specific for the backend of TYPO3. You will typically need these when programming backend modules or other backend functionality. This class is NOT available in the frontend! |
t3lib_BEfunc:: (Non-instantiated!) |
|
t3lib_extMgm |
Extension API functions Functions for extensions to interface with the core system. Many of these functions are used in ext_localconf.php and ext_tables.php files of extensions. They let extensions register their features with the system. See extension programming tutorials for more details. |
t3lib_extMgm:: (Non-instantiated!) |
|
t3lib_iconWorks |
Icons / Part of skinning API Contains a few functions for getting the right icon for a database table record or the skinned version of any other icon. This class is NOT available in the frontend! |
t3lib_iconWorks:: (Non-instantiated!) |
|
template |
Backend Template Class Contains functions for producing the layout of backend modules, setting up HTML headers, wrapping JavaScript sections correctly for XHTML etc. |
$GLOBALS['TBE_TEMPLATE'] or $GLOBALS['SOBE'] or $this->doc (inside of Script Classes)
|
These classes are always included and available in the TYPO3 backend and frontend (except "t3lib_BEfunc" and "t3lib_iconWorks").
The following pages will list methods from these classes in priority of importance. You should at least acquaint yourself with all High-priority functions since these are a part of the Coding Guidelines requirements. In addition you might like to know about other functions which are very often used since they might be very helpful to you (they were to others!).