diff options
Diffstat (limited to 'include/classes/BigPipe/Resource')
-rw-r--r-- | include/classes/BigPipe/Resource/CSS.php | 20 | ||||
-rw-r--r-- | include/classes/BigPipe/Resource/JS.php | 20 |
2 files changed, 40 insertions, 0 deletions
diff --git a/include/classes/BigPipe/Resource/CSS.php b/include/classes/BigPipe/Resource/CSS.php new file mode 100644 index 0000000..71d2244 --- /dev/null +++ b/include/classes/BigPipe/Resource/CSS.php @@ -0,0 +1,20 @@ +<?php +namespace BigPipe\Resource; + +class CSS extends \BigPipe\Resource { + + #=============================================================================== + # Build resource + #=============================================================================== + public function __construct($resourceURL) { + parent::__construct(parent::TYPE_STYLESHEET, $resourceURL); + } + + #=============================================================================== + # Render resource HTML + #=============================================================================== + public function renderHTML() { + return sprintf('<link data-id="%s" href="%s" rel="stylesheet" />', $this->getID(), $this->getURL()); + } +} +?>
\ No newline at end of file diff --git a/include/classes/BigPipe/Resource/JS.php b/include/classes/BigPipe/Resource/JS.php new file mode 100644 index 0000000..f9e109b --- /dev/null +++ b/include/classes/BigPipe/Resource/JS.php @@ -0,0 +1,20 @@ +<?php +namespace BigPipe\Resource; + +class JS extends \BigPipe\Resource { + + #=============================================================================== + # Build resource + #=============================================================================== + public function __construct($resourceURL) { + parent::__construct(parent::TYPE_JAVASCRIPT, $resourceURL); + } + + #=============================================================================== + # Render resource HTML + #=============================================================================== + public function renderHTML() { + return sprintf('<script data-id="%s" src="%s"></script>', $this->getID(), $this->getURL()); + } +} +?>
\ No newline at end of file |