InterJinn

Development Framework For PHP

Property System Configuration

InterJinn provides a great deal of flexibility in its operations. All core services can be replaced with home-brewed versions and custom services can be added to provide any missing functionality. The property system is an example of a core service. Its purpose is to retrieve, resolve, and bind properties and their values to module components that you have created. Since not everyone has a MySQL database server, there exists two core types of property service -- database and file system based. You should look to the appropriate configuration section below for which applies to your project.

Database Property System

$GLOBALS['interJinn']['propertySystem']

The SQL table is standard for the database property system. Provided you have configured the database setting appropriately and imported the table then this should function just by setting the value to database.

Example:
$GLOBALS['interJinn']['propertySystem'] = 'database';

$GLOBALS['interJinn']['propertyDatabase']

When this has not been set, then the InterJinn database declaration with the name default is used for all database properties. The value of this may either be a name of a declared database or an array containing the appropriate database connection parameters as described in the database declaration section.

Example:
$GLOBALS['interJinn']['propertyDatabase'] = 'someOtherDatabase';

$GLOBALS['interJinn']['propertyTablePrefix']

When this has been set, all tables accessed by the property service will be prefixed with the given value. This makes it possible to use InterJinn database properties within a pre-existing site that may already use any of the required table names.

Example:
$GLOBALS['interJinn']['propertyTablePrefix'] = 'interjinn_';

Filesystem Based Property System

$GLOBALS['interJinn']['propertySystem']

Set this value to file to enable the filesystem based property service. You will need to set the other values also for this to work properly.

Example:
$GLOBALS['interJinn']['propertySystem'] = 'file';

$GLOBALS['interJinn']['propertyDataPath']

This should be set to the root path at which all of your property files are being kept. See the Properties Documentation for information about how to create properties. Make sure that you have the right permissions and ownerships set for the target or you will have problems when the cache system attempts to create or access the stored data.

Example:
$GLOBALS['interJinn']['propertyDataPath'] =
    '/var/www/interJinn/data/yourProject/properties/';