Skip to content

02. Config

Simon Striekwold edited this page Apr 6, 2018 · 4 revisions

All properties in the config:

RewriteRules

This property allows you to change the way controllers and actions are selected, and gives the ability to pass GET variables to actions.

The values of this array have to be of the structure controller/action/GET1/GET2 with as many GETs as needed or none at all.

The keys can be any properly formed URL.

By putting words between [] you can pass values from the keys to the values.

GETs will be passed to the action as an array where the keys are the [ids] they got from the RewriteRules.

ErrorViewLocation

The location of the view used by the custom error handeler, if this is not a correct path the custom errors will not work.

The value is a folder/file in the views folder, without .php.

DefaultTitle

The default value of the <title> tag in the layout, this is just the default and can be overwritten in the controller.

DefaultProfilePic

The profile picture that will be used if the user doesn't upload one. Used by the default user system.

BaseUrl

The URL that points to index.php, for example: http://localhost/example/ or http://example.com/.

DataBaseName

The name of the default database.

DataBaseUser

The name of the default database user.

DataBasePassword

The password of the default database user.

Debug

Toggles availability of development tools.

CustomErrors

Toggles the use of custom error handeling.

Env

The Env property defines easily togglable collections of other properties. By default there are two collections Live and Dev, but the Env property simply defines which collection is written into config, so you can add as many as needed.

DetermineLanguage

Has to return the name of a folder in the base/i18n folder.

This function is used to determine the current language. The default function uses a cookie, but you can also use a session or the useragent.

Clone this wiki locally