/** * Call the method Document->render(); */ public function render() { Factory::getDocument()->render(); }
<?php /** * Project: Epsilon * Date: 1/5/16 * Time: 5:33 PM * * @link https://github.com/falmar/Epsilon * @author David Lavieri (falmar) <*****@*****.**> * @copyright 2016 David Lavieri * @license http://opensource.org/licenses/MIT The MIT License (MIT) */ defined("EPSILON_EXEC") or die; use Epsilon\Factory; if (Factory::getDocument()->countByPosition("XHRequest")) { foreach (Factory::getDocument()->getByPosition("XHRequest") as $Content) { echo $Content; } }
<div class="large-12 column"> <?php if (Factory::getDocument()->countByPosition("Component")) { foreach (Factory::getDocument()->getByPosition("Component") as $Content) { echo $Content; } } ?> </div> </div> <?php foreach (Factory::getDocument()->get("StyleSheets") as $CSS) { echo "<link rel='stylesheet' href='{$CSS}' />", PHP_EOL; } foreach (Factory::getDocument()->get("JavaScripts") as $JS) { echo "<script src='{$JS}' ></script>", PHP_EOL; } ?> <script type="text/javascript"> function getURL(URL) { return "<?php echo Factory::getRouter()->getURL(); ?> " + URL; } </script> </body> </html>
/** * Set the position in document */ public function setDocumentPosition() { if (!$this->blPositionSet && $this->Position) { Factory::getDocument()->setInPosition($this->Position, $this); $this->blPositionSet = true; } return $this; }
/** * This is a shortcut to Factory::getDocument()->setSubTitle() method * * @param $SubTitle * @param bool $Language */ protected function setSubTitle($SubTitle, $Language = true) { if ($Language) { $SubTitle = Factory::getLanguage()->_($SubTitle); } Factory::getDocument()->setSubTitle($SubTitle); }