2017 © Pedro Peláez
 

library config

PHP config manager

image

slexx/config

PHP config manager

  • Thursday, May 10, 2018
  • by slexx
  • Repository
  • 0 Watchers
  • 1 Stars
  • 19 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 12 % Grown

The README.md

Config

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Установка

Установка через composer:, (*2)

$ composer require slexx/config

Документация

Config->__construct([$file])

Аргументы:, (*3)

Имя Тип Описание
[$file] string, array Имя файла имя массив данных

Пример:, (*4)

new Config('config.json');
new Config('config.ini');
new Config();
new Config(['foo' => 'bar']);

Config->setFile($file)

Установка пути к файлу, (*5)

Аргументы:, (*6)

Имя Тип Описание
$file null, string Путь к файлу

Возвращает: $this, (*7)

Config->getFile()

Получение пути к файлу, (*8)

Возвращает: null, string, (*9)

Config->save()

Сохранение конфигурайии, (*10)

Возвращает: $this, (*11)

Пример:, (*12)

$config = new Config('config.json')
$config->set('foo', 'bar');
$config->save();

Config->toArray()

Преобразование в массив, (*13)

Возвращает: array, (*14)

Config->all()

Возвращает: array, (*15)

Config->count()

Возвращает: int, (*16)

Config->getIterator()

Возвращает: \ArrayIterator, (*17)

Config->set($key, $value)

Установка переменной конфигурации, (*18)

Аргументы:, (*19)

Имя Тип Описание
$key string Имя переменной
$value mixed Значение переменной

Возвращает: $this, (*20)

Config->has($key)

Проверка существования переменной конфигурации, (*21)

Аргументы:, (*22)

Имя Тип Описание
$key string Имя переменной

Возвращает: bool, (*23)

Config->get($key)

Получение значение переменной конфигурации, (*24)

Аргументы:, (*25)

Имя Тип Описание
$key string Имя переменной

Возвращает: mixed, null - Значение переменной или null в случае её отсуцтвия, (*26)

Config->remove($key)

Удаление переменной конфигурации, (*27)

Аргументы:, (*28)

Имя Тип Описание
$key string Имя переменной

Возвращает: $this, (*29)

The Versions

10/05 2018

dev-master

9999999-dev

PHP config manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aleksei Shchepkin

json ini config yaml

10/05 2018

v1.0.2

1.0.2.0

PHP config manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aleksei Shchepkin

json ini config yaml

31/07 2017

v1.0.0

1.0.0.0

PHP config manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aleksei Shchepkin

json ini config yaml

31/07 2017

v1.0.1

1.0.1.0

PHP config manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aleksei Shchepkin

json ini config yaml