mkgor/yacl

Maintainers

Details

github.com/mkgor/yacl

Source

Issues

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 0

Open Issues: 0

Type:project

1.0.0-beta 2019-12-10 19:56 UTC

This package is not auto-updated.

Last update: 2024-05-26 03:49:02 UTC


README

GitHub GitHub All Releases GitHub code size in bytes

YACL

Yet Another Configuration Language

Logo

YACL is lightweight and easy to use library, which allows you to make your configuration files easy to read and edit.

Requirements

  • Composer (for installation)
  • PHP 7.1 or higher

Installation

Use composer to install it

composer require mkgor/yacl

Usage

After installation, you are ready to use it

<?php

$result = $this->manager->parseYcl('path-to-your-file.ycl');

//Getting data as array
$configurationArray = $result->asArray();

//Getting data as PHP object
$configurationObject = $result->asObject();

Syntax

Creating simple key => value item

key is "value"

Creating array / multidimensional array

arrayName are
  key is "value"
  
  secondArray are
    secondKey is "secondValue"
  end
end

You also can create inline array and specify its items in one line

inlineArray are "firstValue","secondValue","thirdValue" end

Syntax highlighting

In near future i will create .ycl syntax highlighting plugin for Sublime Text