2017 © Pedro Peláez
 

library file-config

file config put and read

image

crcms/file-config

file config put and read

  • Thursday, April 26, 2018
  • by hiword
  • Repository
  • 0 Watchers
  • 2 Stars
  • 455 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 17 % Grown

The README.md

file-config

Sets the storage format of the configuration file, (*1)

Example

update file_config.php, (*2)

'files'=>[
    /tmp/crcms,
    // Set up other parsing drivers
    /tmp/crcms => \CrCms\FileConfig\Drives\SerializeConfig::class,

],

'default_drive'=>\CrCms\FileConfig\Drives\DefaultConfig::class,

put, (*3)

file_config([
    crcms.a=>'a',
    crcms.b=>'b'
])

//or

file_config()->put('crcms.a',['k'=>'k','s'=>'s'])

get, (*4)

file_config('crcms.a')

all, (*5)

file_config('crcms')

destroy, (*6)

file_config()->destroy('crcms.a')

0.0.2 above the new load method, (*7)

Example test.php
key1=>value1
key2=>value2

//get all
file_config()->load('/path/test.conf')->all('test')

0.0.3 Add multiple dot depth support, (*8)

file_config()->load('/path/test.conf')->get('test.depth1.depth2.0'), (*9)

0.0.4 Overwrite all configurations, (*10)

file_config(['crcms'=>[1,2,3]])

//or

file_config()->put('crcms',['key'=>[1,'value']])

Install

You can install the package via composer:, (*11)

composer require crcms/file-config

Laravel

Modify config / app.php, (*12)

'providers' => [
    CrCms\FileConfig\FileConfigServiceProvider::class,
]


'aliases' => [
    'FileConfig' => \CrCms\FileConfig\Facades\FileConfig::class
],

If you'd like to make configuration changes in the configuration file you can pubish it with the following Aritsan command:, (*13)

php artisan vendor:publish --provider="CrCms\FileConfig\FileConfigServiceProvider"

Laravel Testing

phpunit ./tests/Config

License

MIT, (*14)

The Versions

26/04 2018

dev-master

9999999-dev https://github.com/crcms/file-config

file config put and read

  Sources   Download

MIT

The Requires

 

file php config

26/04 2018

0.0.7

0.0.7.0 https://github.com/crcms/file-config

file config put and read

  Sources   Download

MIT

The Requires

 

file php config

06/03 2018

0.0.6

0.0.6.0 https://github.com/crcms/file-config

file config put and read

  Sources   Download

MIT

The Requires

 

file php config

14/01 2018

0.0.5

0.0.5.0 https://github.com/crcms/file-config

file config put and read

  Sources   Download

MIT

The Requires

 

file php config

30/10 2017

0.0.4

0.0.4.0 https://github.com/crcms/file-config

file config put and read

  Sources   Download

MIT

The Requires

 

file php config

08/09 2017

0.0.3

0.0.3.0 https://github.com/crcms/file-config

file config put and read

  Sources   Download

MIT

The Requires

 

file php config

24/06 2017

0.0.2

0.0.2.0 https://github.com/crcms/file-config

file config put and read

  Sources   Download

MIT

The Requires

 

file php config

23/06 2017

0.0.1

0.0.1.0 https://github.com/crcms/file-config

file config put and read

  Sources   Download

MIT

The Requires

 

file php config