Package for reading and fetch dot-ls (.ls) config file into associative array.

1.0.0 2023-09-26 08:06 UTC

This package is auto-updated.

Last update: 2024-06-26 10:54:17 UTC


README

Dotls

Static Badge Static Badge Static Badge Static Badge

Description

Dotls, a PHP package for convert a .ls configuration file into readable config array.

Package Description

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

  1. Create your .ls configuration file.

    You can create your own .ls file to any directory inside your project. Make sure your .lsfile
    contains at least one pair syntax as follows :

    foo:value
    foo_bar:value
    
  2. Register .ls configuration file.

    Register your .ls file using register() method as follows :

     $dotls = ( new Dotls() )->register('path/to/your/.ls');
    
  3. Using your .ls configuration file

    Use ls() method to load your configuration into your project as follows :

     ls('foo');
     ls('foo_bar');