aboutsummaryrefslogtreecommitdiffstats
path: root/include/classes/BigPipe/Resource/Javascript.php
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2017-08-06 22:34:13 +0200
committerThomas Lange <code@nerdmind.de>2017-08-06 22:34:13 +0200
commitc2f0697d3428a60e09de12598d66c9c091b89024 (patch)
treebfe2801ba474ed1880f9e1c35c9ba5a3e554164c /include/classes/BigPipe/Resource/Javascript.php
parent9af3d7a4d2a62b2b4951876a24aa7bcacfe11223 (diff)
downloadbigpipe-c2f0697d3428a60e09de12598d66c9c091b89024.tar.gz
bigpipe-c2f0697d3428a60e09de12598d66c9c091b89024.tar.xz
bigpipe-c2f0697d3428a60e09de12598d66c9c091b89024.zip
The "CSS" and "JS" resource representation classes has been renamed to "Stylesheet" and "Javascript" to make it more consistent with the other class names (instead of using the abbreviations).
Diffstat (limited to 'include/classes/BigPipe/Resource/Javascript.php')
-rw-r--r--include/classes/BigPipe/Resource/Javascript.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/classes/BigPipe/Resource/Javascript.php b/include/classes/BigPipe/Resource/Javascript.php
new file mode 100644
index 0000000..8afb5df
--- /dev/null
+++ b/include/classes/BigPipe/Resource/Javascript.php
@@ -0,0 +1,27 @@
+<?php
+#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
+# Resource representation [javascript] [Thomas Lange <code@nerdmind.de>] #
+#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
+# #
+# [More information coming soon] #
+# #
+#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
+namespace BigPipe\Resource;
+
+class Javascript extends \BigPipe\Resource {
+
+ #===============================================================================
+ # Build resource
+ #===============================================================================
+ public function __construct($customID = NULL, $resourceURL) {
+ parent::__construct($customID, 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