Essai au propre

This commit is contained in:
Gauvain Boiché
2020-04-01 16:45:39 +02:00
parent f282fd0d32
commit 745270ab61
1538 changed files with 80 additions and 351590 deletions

View File

@@ -1,26 +0,0 @@
<?php
/*
* @package s9e\TextFormatter
* @copyright Copyright (c) 2010-2019 The s9e Authors
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
namespace s9e\TextFormatter\Configurator\RendererGenerators\XSLT;
use s9e\TextFormatter\Configurator\TemplateNormalizer;
class Optimizer
{
public $normalizer;
public function __construct()
{
$this->normalizer = new TemplateNormalizer;
$this->normalizer->clear();
$this->normalizer->append('MergeConsecutiveCopyOf');
$this->normalizer->append('MergeIdenticalConditionalBranches');
$this->normalizer->append('OptimizeNestedConditionals');
$this->normalizer->append('RemoveLivePreviewAttributes');
}
public function optimizeTemplate($template)
{
return $this->normalizer->normalizeTemplate($template);
}
}