Skip to content
This repository was archived by the owner on Dec 10, 2017. It is now read-only.

Latest commit

 

History

History
16 lines (13 loc) · 401 Bytes

File metadata and controls

16 lines (13 loc) · 401 Bytes

Locates md files, parses contents to exposes the front matter (and the body) in the SplFileInfo object.

require_once 'vendor/autoload.php';

$loader = new \Loader\Loader('./test/content');
$files = $loader
    ->ext('md')
    ->load();

foreach ($files as $file) {
    /* @var $file \Loader\SplFileInfo */
    echo $file->getFrontmatter() . "\n";
    echo $file->getBody() . "\n";
}