Beispiel #1
0
 /**
  * Optimize a single template
  *
  * @param  string $template Original template
  * @return string           Optimized template
  */
 public function optimizeTemplate($template)
 {
     return $this->normalizer->normalizeTemplate($template);
 }
 /**
  * @testdox Default normalization rules
  * @dataProvider getDefault
  */
 public function testDefault($template, $expected)
 {
     $templateNormalizer = new TemplateNormalizer();
     $this->assertSame($expected, $templateNormalizer->normalizeTemplate($template));
 }
Beispiel #3
0
 /**
  * Normalize this template's content
  *
  * @param  TemplateNormalizer $templateNormalizer
  * @return void
  */
 public function normalize(TemplateNormalizer $templateNormalizer)
 {
     $this->forensics = null;
     $this->template = $templateNormalizer->normalizeTemplate($this->template);
     $this->isNormalized = true;
 }