Hoa central
Code.php
Go to the documentation of this file.
1 <?php
2 
37 namespace Hoa\Xyl\Interpreter\Html;
38 
39 use Hoa\Stream;
40 
49 class Code extends GenericPhrasing
50 {
57  protected function paint(Stream\IStream\Out $out)
58  {
59  $out->writeAll('<code' . $this->readAttributesAsString() . '>');
60 
61  if (true === $this->attributeExists('class') &&
62  'language-' === substr($this->readAttribute('class'), 0, 9)) {
63  $out->writeAll($this->computeValue());
64  } else {
65  $this->computeValue($out);
66  }
67 
68  $out->writeAll('</code>');
69 
70  return;
71  }
72 }
paint(Stream\IStream\Out $out)
Definition: Code.php:57