PHP Класс Crunz\Configuration\Configuration

Наследование: extends Crunz\Singleton
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$instance The instance of the configuration class
$parameters array Store parameters

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
__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

Описание методов

__construct() защищенный Метод

Process the configuration file into an array
protected __construct ( )

all() публичный Метод

Return all the parameters as an array
public all ( ) : array
Результат array

get() публичный Метод

Return a parameter based on a key
public get ( string $key, $default = null ) : string
$key string
Результат string

has() публичный Метод

Check if a parameter exist
public has ( string $key ) : boolean
$key string
Результат boolean

locateConfigFile() защищенный Метод

Locate the right config file and return its name
protected locateConfigFile ( ) : string
Результат string

parse() защищенный Метод

Load configuration files and parse them
protected parse ( $filename ) : array
Результат array

process() защищенный Метод

Handle the configuration settings
protected process ( $filename ) : array
Результат array

set() публичный Метод

Set a parameter
public set ( string $key, mixed $value ) : array
$key string
$value mixed
Результат array

Описание свойств

$instance защищенное статическое свойство

The instance of the configuration class
protected static $instance

$parameters защищенное свойство

Store parameters
protected array $parameters
Результат array