-
Notifications
You must be signed in to change notification settings - Fork 0
CI_Config
Mathieu Nayrolles edited this page Jan 20, 2016
·
1 revision
Config Class
This class contains functions that enable config files to be managed
- Class name: CI_Config
- Namespace:
public array $config = array()
List of all loaded config values
- Visibility: public
public array $is_loaded = array()
List of all loaded config files
- Visibility: public
public array $_config_paths = array(APPPATH)
List of paths to search when trying to load a config file.
- Visibility: public
void CI_Config::__construct()
Class constructor
Sets the $config data from the primary config.php file as a class variable.
- Visibility: public
boolean CI_Config::load(string $file, boolean $use_sections, boolean $fail_gracefully)
Load Config File
- Visibility: public
- $file string - <p>Configuration file name</p>
- $use_sections boolean - <p>Whether configuration values should be loaded into their own section</p>
- $fail_gracefully boolean - <p>Whether to just return FALSE or display an error message</p>
string|null CI_Config::item(string $item, string $index)
Fetch a config file item
- Visibility: public
- $item string - <p>Config item name</p>
- $index string - <p>Index name</p>
string|null CI_Config::slash_item(string $item)
Fetch a config file item with slash appended (if not empty)
- Visibility: public
- $item string - <p>Config item name</p>
string CI_Config::site_url(string|array<mixed,string> $uri, string $protocol)
Site URL
Returns base_url . index_page [. uri_string]
- Visibility: public
- $uri string|array<mixed,string> - <p>URI string or an array of segments</p>
- $protocol string
string CI_Config::base_url(string|array<mixed,string> $uri, string $protocol)
Base URL
Returns base_url [. uri_string]
- Visibility: public
- $uri string|array<mixed,string> - <p>URI string or an array of segments</p>
- $protocol string
string CI_Config::_uri_string(string|array<mixed,string> $uri)
Build URI string
- Visibility: protected
- $uri string|array<mixed,string> - <p>URI string or an array of segments</p>
string CI_Config::system_url()
System URL
- Visibility: public
void CI_Config::set_item(string $item, string $value)
Set a config file item
- Visibility: public
- $item string - <p>Config item key</p>
- $value string - <p>Config item value</p>