PHP Class CI_Config, TastyIgniter

Afficher le fichier Open project: tastyigniter/tastyigniter Class Usage Examples

Méthodes publiques

Свойство Type Description
$_config_paths array List of paths to search when trying to load a config file.
$config array List of all loaded config values
$is_loaded array List of all loaded config files

Méthodes publiques

Méthode Description
__construct ( ) : void Class constructor
base_url ( string | string[] $uri = '', string $protocol = NULL ) : string Base URL
item ( string $item, string $index = '' ) : string | null Fetch a config file item
load ( string $file = '', boolean $use_sections = FALSE, boolean $fail_gracefully = FALSE ) : boolean Load Config File
set_item ( string $item, string $value ) : void Set a config file item
site_url ( string | string[] $uri = '', string $protocol = NULL ) : string Site URL
slash_item ( string $item ) : string | null Fetch a config file item with slash appended (if not empty)
system_url ( ) : string System URL

Méthodes protégées

Méthode Description
_uri_string ( string | string[] $uri ) : string Build URI string

Method Details

__construct() public méthode

Sets the $config data from the primary config.php file as a class variable.
public __construct ( ) : void
Résultat void

_uri_string() protected méthode

Build URI string
protected _uri_string ( string | string[] $uri ) : string
$uri string | string[] URI string or an array of segments
Résultat string

base_url() public méthode

Returns base_url [. uri_string]
public base_url ( string | string[] $uri = '', string $protocol = NULL ) : string
$uri string | string[] URI string or an array of segments
$protocol string
Résultat string

item() public méthode

Fetch a config file item
public item ( string $item, string $index = '' ) : string | null
$item string Config item name
$index string Index name
Résultat string | null The configuration item or NULL if the item doesn't exist

load() public méthode

Load Config File
public load ( string $file = '', boolean $use_sections = FALSE, boolean $fail_gracefully = FALSE ) : boolean
$file string Configuration file name
$use_sections boolean Whether configuration values should be loaded into their own section
$fail_gracefully boolean Whether to just return FALSE or display an error message
Résultat boolean TRUE if the file was loaded correctly or FALSE on failure

set_item() public méthode

Set a config file item
public set_item ( string $item, string $value ) : void
$item string Config item key
$value string Config item value
Résultat void

site_url() public méthode

Returns base_url . index_page [. uri_string]
public site_url ( string | string[] $uri = '', string $protocol = NULL ) : string
$uri string | string[] URI string or an array of segments
$protocol string
Résultat string

slash_item() public méthode

Fetch a config file item with slash appended (if not empty)
public slash_item ( string $item ) : string | null
$item string Config item name
Résultat string | null The configuration item or NULL if the item doesn't exist

system_url() public méthode

System URL
Deprecation: 3.0.0 Encourages insecure practices
public system_url ( ) : string
Résultat string

Property Details

$_config_paths public_oe property

List of paths to search when trying to load a config file.
public array $_config_paths
Résultat array

$config public_oe property

List of all loaded config values
public array $config
Résultat array

$is_loaded public_oe property

List of all loaded config files
public array $is_loaded
Résultat array