Environments

Akelos has the concept of environments to represent the stages of an application's lifecycle: test, development, and production are the defaults. Specify your choice defining AK_ENVIRONMENT constant in your config/config.php file like:

define('AK_ENVIRONMENT', 'development');

AK_ENVIRONMENT can currently have one of three values:

Within a Akelos application, AK_ENVIRONMENT can most easily be accessed with the following code:

if('development' == AK_ENVIRONMENT){ 
 $Model->dbug(); // Enables SQL query output
}

Each environment has a corresponding environment file (eg. config/environments/name.php) with its particular config code.

Loading Akelos environment gives you a fully configured context for accessing the model in an Akelos application. This is extremely useful when you need to run upgrade or maintenance scripts. Or when you need to interrogate the model ad-hoc.

 
environments.txt · Last modified: 2007/07/23 13:58 by 88.24.204.159
 

The Akelos Framework was created by Bermi Ferrer and other contributors.
Potions of the code and documentation have been ported from Ruby on Rails.

The Akelos Framework is released under the LGPL license.

"Akelos", "Akelos Framework", and the Akelos logo are trademarks of Bermi Labs All rights reserved.

Wiki driven by DokuWiki