Solar::start()
Starts Solar: loads configuration values and and sets up the environment.
Parameters
(mixed)
$config
: The configuration source value.
Returns
(void)
Description
Starts Solar: loads configuration values and and sets up the environment.
Note that this method is overloaded; you can pass in different value types for the $config parameter.
null|false
-- This will not load any new configuration values; you will get only the default values defined in the Solar class.string
-- The string is treated as a path to a Solar.config.php file; the return value from that file will be used for Solar_Config::load().array
-- This will use the passed array for the Solar_Config::load() values.object
-- The passed object will be cast as an array, and those values will be used for Solar_Config::load().
Here are some examples of starting with alternative configuration parameters:
<?php
require_once 'Solar.php';
// don't load any config values at all
Solar::start();
// point to a config file (which returns an array)
Solar::start('/path/to/another/config.php');
// use an array as the config source
$config = array(
'Solar' => array(
'ini_set' => array(
'error_reporting' => E_ALL,
),
),
);
Solar::start($config);
// use an object as the config source
$config = new StdClass;
$config->Solar = array(
'ini_set' => array(
'error_reporting' => E_ALL,
),
);
Solar::start($config);