anandaerditya / dotls
Package for reading and fetch dot-ls (.ls) config file into associative array.
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/anandaerditya/dotls
README
Description
Dotls, a PHP package for convert a .ls configuration file into readable config array.
Package Description
- Package Name : dotls
- Author : Ananda Erditya ( anandaerditya )
- Github URL : https://github.com/anandaerditya/dotls
- Language : PHP
- Licence : MIT
Requirements
- PHP Version 8.0 or higher
- PHP fileinfo extension
Installing Package
Use the following command to install the package via Composer Dependency Manager.
composer require anandaerditya/dotls
Using The Package
-
Create your
.lsconfiguration file.You can create your own
.lsfile to any directory inside your project. Make sure your.lsfile
contains at least one pair syntax as follows :foo:value foo_bar:value -
Register
.lsconfiguration file.Register your
.lsfile usingregister()method as follows :$dotls = ( new Dotls() )->register('path/to/your/.ls'); -
Using your
.lsconfiguration fileUse
ls()method to load your configuration into your project as follows :ls('foo'); ls('foo_bar');