Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

Chapter 1. Developer API

Extension Key: api_macmade

Copyright 2000-2002, info@macmade.net, <info@macmade.net>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

1.1. Introduction

About this API

The goal of this API is to provide to the Typo3 developers community some useful functions, to help in the process of extension development. It includes functions, for frontend, backend, databases and miscellaneous development. It's not here to replace any of the existing Typo3 core class or function. It just try to complete them by providing a quick way to develop extensions, and to produce code.

Why another API?

Typo3 comes with a bunch of wonderful functions. But for new developers, it may be hard to get the whole picture with extensions, classes hierarchy, etc. That was the case for me when I begun working with Typo3, and it's still the case now for a lot of things.

However, when I begun to develop extensions, I quickly realized that I often had to use the same functions inside my classes, or adapt previously build functions for a specific need. So I decided, for all of my extensions, to build another one, containing all the generic functions I use very frequently, and to make a dependencies to that big one. So now I can access my own functions from everywhere, without having to include them. It's just a gain of time to me, and it help me to keep my code clean and upgradeable easily.

In the logic of OpenSource, I also decided to make this API public, as it may help some people. I really hope it will.

How to use this API

The API is divided into six main sections. The first one is for the internal class processing, the second one for frontend development (all the functions are prefixed with fe_), the third one for backend development (prefix be_), the fourth for database queries (prefix db_), the fifth for miscellaneous development (prefix div_), and the last one for debugging (no prefix).

You'll find in this manual a complete reference of the class. Be sure to read carefully the description of the class constructor, just below. It will teach you how to use this API in your own extensions. Without this step, you won't be able to use most of the functions, as the class needs, except for some cases, to be instantiated in a special way, to ensure to usability of the API functions.