daux.io/libs/Processor.php

72 lignes
1.5 KiB
PHP
Brut Vue normale Historique

2015-07-17 18:34:00 +02:00
<?php namespace Todaymade\Daux;
use League\CommonMark\Environment;
use Symfony\Component\Console\Output\OutputInterface;
use Todaymade\Daux\Tree\Directory;
class Processor
{
/**
* @var Daux
*/
protected $daux;
/**
* @var OutputInterface
*/
protected $output;
/**
* @var integer
*/
protected $width;
2015-07-17 23:38:06 +02:00
/**
* @param Daux $daux
* @param OutputInterface $output
* @param integer $width
*/
2015-07-17 18:34:00 +02:00
public function __construct(Daux $daux, OutputInterface $output, $width)
{
$this->daux = $daux;
$this->output = $output;
$this->width = $width;
}
2015-07-17 23:38:06 +02:00
/**
* With this connection point, you can transform
* the tree as you want, move pages, modify
* pages and even add new ones.
*
* @param Directory $root
*/
2015-07-17 18:34:00 +02:00
public function manipulateTree(Directory $root)
{
}
2015-07-17 23:38:06 +02:00
/**
* This connection point provides
* a way to extend the Markdown
* parser and renderer.
*
* @param Environment $environment
*/
2015-07-17 18:34:00 +02:00
public function extendCommonMarkEnvironment(Environment $environment)
{
}
/**
* Provide new generators with this extension point. You
* can simply return an array, the key is the format's
* name, the value is a class name implementing the
* `Todaymade\Daux\Format\Base\Generator` contract.
* You can also replace base generators.
*
* @return array
*/
public function addGenerators()
{
return [];
}
2015-07-17 18:34:00 +02:00
}