PHP Class Crunz\Configuration\Configuration

Inheritance: extends Crunz\Singleton
Afficher le fichier Open project: lavary/crunz Class Usage Examples

Protected Properties

Свойство Type Description
$instance The instance of the configuration class
$parameters array Store parameters

Méthodes publiques

Méthode Description
all ( ) : array Return all the parameters as an array
get ( string $key, $default = null ) : string Return a parameter based on a key
has ( string $key ) : boolean Check if a parameter exist
set ( string $key, mixed $value ) : array Set a parameter

Méthodes protégées

Méthode Description
__construct ( ) Process the configuration file into an array
locateConfigFile ( ) : string Locate the right config file and return its name
parse ( $filename ) : array Load configuration files and parse them
process ( $filename ) : array Handle the configuration settings

Method Details

__construct() protected méthode

Process the configuration file into an array
protected __construct ( )

all() public méthode

Return all the parameters as an array
public all ( ) : array
Résultat array

get() public méthode

Return a parameter based on a key
public get ( string $key, $default = null ) : string
$key string
Résultat string

has() public méthode

Check if a parameter exist
public has ( string $key ) : boolean
$key string
Résultat boolean

locateConfigFile() protected méthode

Locate the right config file and return its name
protected locateConfigFile ( ) : string
Résultat string

parse() protected méthode

Load configuration files and parse them
protected parse ( $filename ) : array
Résultat array

process() protected méthode

Handle the configuration settings
protected process ( $filename ) : array
Résultat array

set() public méthode

Set a parameter
public set ( string $key, mixed $value ) : array
$key string
$value mixed
Résultat array

Property Details

$instance protected_oe static_oe property

The instance of the configuration class
protected static $instance

$parameters protected_oe property

Store parameters
protected array $parameters
Résultat array