1: <?php
2:
3: /**
4: * Copyright 2015, Eduardo Trujillo
5: *
6: * For the full copyright and license information, please view the LICENSE
7: * file that was distributed with this source code.
8: *
9: * This file is part of the Nucleus package
10: */
11:
12: namespace Chromabits\Nucleus\View\Page;
13:
14: use Chromabits\Nucleus\Support\Html as HtmlUtils;
15: use Chromabits\Nucleus\View\Interfaces\RenderableInterface;
16: use Chromabits\Nucleus\View\Interfaces\SafeHtmlProducerInterface;
17: use Chromabits\Nucleus\View\SafeHtmlWrapper;
18:
19: /**
20: * Class Doctype.
21: *
22: * @author Eduardo Trujillo <ed@chromabits.com>
23: * @package Chromabits\Nucleus\View\Page
24: */
25: class Doctype implements RenderableInterface, SafeHtmlProducerInterface
26: {
27: /**
28: * Render the object into a string.
29: *
30: * @return mixed
31: */
32: public function render()
33: {
34: return '<!DOCTYPE html>';
35: }
36:
37: /**
38: * Get a safe HTML version of the contents of this object.
39: *
40: * @return SafeHtmlWrapper
41: */
42: public function getSafeHtml()
43: {
44: return HtmlUtils::safe($this->render());
45: }
46: }
47: