Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.
/ php-yaml Public archive
forked from yalesov/php-yaml

Wrapper around Symfony's Yaml parser - added __DIR__ support.

Notifications You must be signed in to change notification settings

may-den/php-yaml

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heartsentwined\Yaml

Build Status

Wrapper around Symfony's Yaml parser - added __DIR__ support.

Installation

Composer:

{
    "require": {
        "heartsentwined/yaml": "1.*"
    }
}

Usage

Two constants added:

  • __DIR__: behave as expected
  • ___DIR___ (an extra underscore around): literal __DIR__

Parse a Yaml file foo/bar.yml:

use Heartsentwined\Yaml\Yaml;
$parsedArray = Yaml::parse('foo/bar.yml');

Parse a Yaml string foo: bar (of course, neither __DIR__ nor ___DIR___ would be available)

use Heartsentwined\Yaml\Yaml;
$parsedArray = Yaml::parse('foo: bar');

About

Wrapper around Symfony's Yaml parser - added __DIR__ support.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%