diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/phorkie/Renderer/Plaintext.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/phorkie/Renderer/Plaintext.php b/src/phorkie/Renderer/Plaintext.php new file mode 100644 index 0000000..ef448f9 --- /dev/null +++ b/src/phorkie/Renderer/Plaintext.php @@ -0,0 +1,25 @@ +<?php +namespace phorkie; + +/** + * Render plain .txt files + */ +class Renderer_Plaintext +{ + /** + * Simply displays the file + * + * @param File $file File to render + * + * @return string HTML + */ + public function toHtml(File $file) + { + $html = '<div class="code"><pre class="txt">' + . htmlspecialchars($file->getContent()) + . '</pre></div>' . "\n"; + return $html; + } +} + +?> |
