sodapop.json

Sodapop.json is the configuration file for a Sodapop application, located in the application's /conf directory. It is required to exist, but can be blank if the application wants to use all of the platform defaults.

An example sodapop.json file can be seen here:

The configuration file can contain arbitrary keys, and these can be polled within the application through the Application object. Some of the keys (listed below) are used within the framework itself.

Inheritance

Sodapop.conf allows users to set a default group of configuration settings and then override those for particular hostnames. The default settings are listed under the "default" object in the example above, and the host-specific overrides are under hostname keys in the "hosts" object.

If any domain name is used to connect to the site that isn't in the "hosts" object, the default settings are used.

Reserved Keys

Directories
controller_path (string, default: controllers)
The path to the controllers. Relative to the application root directory.
view_path (string, default: views)
The path to the views. Relative to the application root directory, or the theme root directory if themes are used.
layout_path (string, default: layouts)
The path to the layouts. Relative to the application root directory, or the theme root directory if themes are used.
Database
db_driver (string, default: Sodapop_Database_Pdo)
The database driver to use.
db_host (string)
The database hostname.
db_port (integer)
The database port number
db_name (string)
The database schema name
db_user (string)
The database username
db_password (string)
The database password
Themes
theme (string)
The theme to use. This should match a directory name under the application's /themes directory.
theme_ignore_actions (array of strings)
Tells Sodapop to not apply the theme for particular controllers and/or actions. To exclude an action, the string would be controller_name/action_name, and to exclude an entire controller the string would be controller_name.
Miscellaneous
debug (boolean, default: false)
Turns on PHP's debugging functions.
use_layouts (boolean, default: true)
Tells Sodapop to use layouts.