Download the PHP package andrewsuzuki/perm without Composer
On this page you can find all versions of the php package andrewsuzuki/perm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download andrewsuzuki/perm
More information about andrewsuzuki/perm
Files in andrewsuzuki/perm
Package perm
Short Description Save array-return configuration files in Laravel 4.
License MIT
Informations about the package perm
perm
perm offers a simple way to save and retrieve "native" php configuration files in the filesystem.
For example, if writing a cms like Vessel, you might want to save fast configuration values (like a site title or url) perm-anently from an admin interface. This is easy with perm.
Requirements
- PHP 5.3+ or HHVM
- Laravel 4
- Composer
Installation
perm installs with Composer through Packagist.
Add the following to your composer.json:
Then run composer update
.
Now add the following to your providers
array in config/app.php:
Now add the facade alias to the aliases
array:
And that's it.
Configuration
If you'd like to load/save files from a base directory other than app/config, publish the package's configuration:
Then modify the basepath in app/config/packages/andrewsuzuki/perm/config.php.
Usage
- Load a config file, or mark a non-existing file/directory for creation. chainable
If the file's directory does not exist, it will be created.
-
Get a config value.
-
Get multiple values in one go (returns array).
-
Get all config values.
-
Set a value. chainable
-
Set a value if and only if it doesn't exist. chainable
-
Set multiple values in one go. chainable
-
Check if a key exists.
-
Forget a key. chainable
-
Reset (forget all key/values). chainable
-
Save updated config. chainable
- Update current loaded filename (will not update loaded config). Filename basename must not contain dots. chainable
Method chaining
Chaining methods is an easy way to consolidate, and improve readability. You can combine any of the above methods marked as chainable. For example:
Contributors
To contribute, please fork and submit a pull request. Otherwise, feel free to submit possible enhancements/issues on the issues page.
License
Vessel is open-sourced software licensed under the MIT license
All versions of perm with dependencies
illuminate/support Version 4.1.*
illuminate/filesystem Version 4.1.*
illuminate/config Version 4.1.*