webuni/front-matter

Front matter parser and dumper for PHP

1.1.0 2018-03-20 13:36 UTC

This package is auto-updated.

Last update: 2020-10-15 08:06:14 UTC


README

Packagist Build Status Scrutinizer Code Quality Code Coverage

Front matter (yaml, json, neon, toml) parser and dumper for PHP. Front matter allows page-specific variables to be included at the top of a page.

Installation

This project can be installed via Composer:

composer require webuni/front-matter

Usage

$frontMatter = new Webuni\FrontMatter\FrontMatter();

$document = $frontMatter->parse($str);

$data = $document->getData();
$content = $document->getContent();

Alternatives