2017 © Pedro Peláez
 

library hsc

Hierarchal String Config, for dealing with large strings in config

image

kickupx/hsc

Hierarchal String Config, for dealing with large strings in config

  • Thursday, February 11, 2016
  • by Kickupx
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

HSC

Hierarchal String Config, For dealing with customizable strings where input is wanted in the middle of it. For example HTML strings., (*1)

Configformat

Really simple, (*2)


<<<<< NAME <body> ====== </body> >>>>> /NAME

Where NAME is the name of the config. Normal characters, numbers, _ and . are recognized ===== denotes where insertion is meant to happen. And last row denotes the end. Notice name is required., (*3)

Usage

Dealing with this is done using the Parser and Document class., (*4)

Parse

```php $code = " <<<<<< Config Text, Text =========== More More, (*5)

/Config, (*6)

  <<<<<<<<< Super
     Start, Start
     ===============
     End End
  >>>>>>>>> /Super

"; $parser = new Parser(); $doc = $parser->parse($code); ```, (*7)

Get entries

php $doc->get('Config'); $doc->get('Config', 'default start', 'default end');, (*8)

Add entries

php $doc->addEntry(new Entry('Config'); $doc->addEntry(new Entry('Config', 'default start', 'default end'));, (*9)

Serializing

php $doc->__toString();, (*10)

The Versions

11/02 2016

dev-master

9999999-dev

Hierarchal String Config, for dealing with large strings in config

  Sources   Download

GPLv3

The Requires

 

by Avatar Kickupx

11/02 2016

1.0.0

1.0.0.0

Hierarchal String Config, for dealing with large strings in config

  Sources   Download

GPLv3

The Requires

 

by Avatar Kickupx