Function get_document
Returns the global document object.
This document is used by classes when they need to add assets. Once assets are collected one can simple echo the assets while building the response HTML.
Example:
<?php
namespace Brickrouge;
$document = get_document(); $document->css->add(Brickrouge\ASSETS . 'brickrouge.css'); $document->js->add(Brickrouge\ASSETS . 'brickrouge.js');
?><!DOCTYPE html> <html> <head> <?php echo $document->css ?> </head> <body> <?php echo $document->js ?> </body> </html>
Note: Calls to this function are forwarded to Helpers::get_document().
Return value summary
|