private static _conf ($app)
Get the configuration settings for an app. Returns an array of all settings.
public static __callStatic ($app, $args)
Get/set a configuration value for a given app. Use the app name as the method name, using the form:
Appconf::appname ($section = null, $setting = null, $new_value = null);
public static get ($app, $section, $setting)
Get a configuration value for an app. Can retrieve the entire app's settings, a section of the settings, or an individual value.
If no $section is specified, the entire configuration for the app will be returned as an array.
If no $setting is specified, the section will be returned as an array.
public static set ($app, $section, $setting, $new_value)
Set a configuration value for an app. Note that this does not save the changes permanently, only for the current request.
public static merge ($app, $new_values)
Get an updated configuration for an app based on its current
settings and an array of new values. This new configuration
can be saved to
conf/app.APP_NAME.ELEFANT_ENV.php which will
override the values in the original
file. Note that the
[Admin] section is omitted, since this
should not be saved to custom configuration files.
Ini::write() for writing the output to disk.
public static options ($basename = 'hooks', $hook = false)
Fetch all published hook handlers from a specific config file in across all apps. This may be a specific file, or a specific option list within the file.
$payment_options = Appconf::options ('payments'); // array ('stripe/payment' => 'Stripe Payments') $commands = Appconf::options ('cli', 'commands'); // array ('blog/publish-queue' => 'Publish scheduled...', ...etc...)
This class manages access to the configuration settings for all apps. In the usage example, both forms of each are equivalent, with the former being the recommended style for brevity.