Configuration XML Reference
Bedrock application settings are stored in XML files located in the application's cfg directory. Config files follow a simple structure that can easily be extended by adding custom tags directly into the document. The basic structure of a config file and the initial tags already understood by Bedrock are outlined below.
XML Heirarchy
Configuration Definition
These tags represent configuration options already understood by Bedrock. Additional tags can be defined for use within your application or plugin/extension.
Note: Any attributes marked in bold are required.
CONFIG | Description | |||
|---|---|---|---|---|
| The main container for a configuration definition file. All other tags should be defined within this tag. | ||||
| Subtags | ||||
config |
||||
MAIN | Description | |||
| An arbitrary name for a configuration environment. Environments are collections of settings to use together. | ||||
| Subtags | ||||
meta, root, database, cookie, env |
||||
| Attribute | Type | Possible Values | Description | |
extends | string | * | The name of another configuration environment that the current one extends. | |
META | Description | |||
| A container for related meta information about the application. | ||||
| Subtags | ||||
title, version, namespace |
||||
TITLE | Description | |||
| A title for the application. | ||||
VERSION | Description | |||
| The applilcation's current version. | ||||
NAMESPACE | Description | |||
| The applilcation's root namespace in the class hierarchy (under the lib directory). | ||||
VERSION | Description | |||
| The applilcation's current version. | ||||
ENV | Description | |||
| A container for server environment values. | ||||
| Subtags | ||||
os |
||||
OS | Description | |||
| A container for the application's cookie settings. | ||||
NAME | Description | |||
| The application's cookie name. | ||||
LIFE | Description | |||
| The application's cookie lifetime. | ||||
Root Directory Settings
These settings allow for defining custom locations for root directories for various parts of an application. If omitted, the default settings will be used (as defined in the getting started section).
ROOT | Description | |||
|---|---|---|---|---|
| A container for root directory settings. | ||||
| Subtags | ||||
system, cfg, lib, log, pub |
||||
SYSTEM | Description | |||
| The absolute path to the application's main root directory. | ||||
CFG | Description | |||
| The location of the configuration file directory. | ||||
LIB | Description | |||
| The library directory, containing all external libraries used in an application (including the Bedrock codebase). | ||||
LOG | Description | |||
| The log file directory. | ||||
PUB | Description | |||
| The public directory containing all browser-accessible files, as well as the main index script (“index.php”). | ||||
Database Settings
Currently only MySQL databases are supported, though the type setting is still required. Wider database support is expected in future releases.
DATABASE | Description | |||
|---|---|---|---|---|
| A container for database configuration settings. | ||||
| Subtags | ||||
type, host, dbname, username, password, port |
||||
TYPE | Description | |||
| The type of databse system (i.e. “mysql”). | ||||
HOST | Description | |||
| The hostname or IP address of the database server. | ||||
PORT | Description | |||
| The port on which the database is hosted (omitting this tag will use the default for the specified type). | ||||
DBNAME | Description | |||
| The name of the database to use. | ||||
USERNAME | Description | |||
| A valid username for the database. | ||||
PASSWORD | Description | |||
| A valid password for the database. | ||||