This package implements the pj DataProvider Framework library under Joomla! CMS. Refer there for detailed description of InfoBase, SearchKey, IDataProvider and MySqlDataProvider.

This documentation is powered by the Dispute component based on the pj DataProvider for Joomla! and pj DataProvider Framework respectively.


pj DataProvider Framework package (lib_pj) is an alternative database concept beside of Joomla's JDatabase framework.

The developer designs new classes extending the InfoBase class and registers them at start-up in the singleton DataProviderBase instance. It is not necessary to add any code to bare class declarations, although it is convenient to outsource specific functionality there.

The framework offers full database access for registered InfoBase classes, including retrieving by ID or by queries passed either as string or as SearchKey structure. It recognizes changes of instance data and inserts, updates and deletes instances together with corresponding table rows, optionally in nested transactions. It ensures that at any time, there exists just one unique instance of InfoBase extending class corresponding to one database table row.

The developer has to write an extension of the DataProviderBase class and outsource his/her business layer functions there.

Abstract class provides simple UTF-8 conversion methods with special support for Latin EXTENDED A+B characters.

The UTF8Helper class is located in the file /libraries/pj/UTF8Helper.php.

static function strlen($s)

Returns character count of $s or -1 if $s is not a valid UTF-8 string.

static function toHtml($s)

Returns a html representation of $s or error message if $s is not valid UTF-8 string.

Illegal UTF-8 characters cause false decoding, but do not interrupt the conversion.

static function toAscii($s)

Returns an Ascii equivalent of $s.

Latin EXTENDED A+B characters are decoded to Ascii best match character or token. Other multibyte characters are displayed in Unicode representation as "[U+xxxx]".
Illegal UTF-8 characters cause false decoding, but do not interrupt the conversion.

static function toFileName($s) Returns toAscii($s) with illegal filename characters replaced by '-'.