Personal tools

Translations of this page:
You are here: Getting started » Classes
Trace: » Database Framework » A tutorial for writing BIGACE portlets » SSL » Templates » Search » Configurable User Attributes » File Logger » Classes

Classes

There are two main Packages in BIGACE: “api” and “classes”.

The “api” folder holds interface definitions (due to PHP4 compatibility they are still classes, but meant as interfaces), the “class” folder is the place to find implementations of these interfaces and all core classes.

Loading Classes

To load a class, you type something like this:

import('package.subpackage.classname');

Package here is “api” or “classes”. Subpackage is the path beneath the Package, for example “item” or “util/links”. Sach folder separator (/) has to be replaced by a (.) dot.

For example, you want to load the Class “system/util/links/SearchLink.php”, you type

import('classes.util.links.SearchLink');

The import function uses Java naming syntax, what makes it possible to load subpackages within any directory depth.

All Classes that come shipped with BIGACE use Java Naming Syntax, what at least means Filename.php = Classname.

Some further examples of loading Classes:

import('api.principal.Principal');
import('classes.principal.DefaultPrincipal');
import('classes.item.Item');
import('classes.util.links.SearchLink');
 

Recent changes RSS feed Valid XHTML 1.0 Valid CSS