clean/phpdoc-md

View on GitHub
src/Markdown/GitHub/Readme.php

Summary

Maintainability
A
1 hr
Test Coverage
<?php namespace Clean\PhpDocMd\Markdown\GitHub;

use Clean\View\Phtml;

class Readme extends Phtml
{
    private $links;

    public function __construct($title)
    {
        $this->links = new \stdClass;
        $this->set('title', $title);
        $this->set('toc', $this->links);
        $this->setTemplate(__DIR__.'/../../../tpl/github.readme.phtml');
    }

    public function addLink($name, $mdPath)
    {
        $this->links->$name = $mdPath;
        return $this;
    }
}