aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2015-07-25 21:55:05 +0200
committerThomas Lange <code@nerdmind.de>2015-07-25 21:55:05 +0200
commit903100ecb99ab926d4ac3be4eba11ea1c9800e12 (patch)
tree44d025c884bffe7f90c6055a6476b25e4cf0271c
parent6abf184af5be6b8932373fc5f92afe46e0a0a2c9 (diff)
downloadbigpipe-903100ecb99ab926d4ac3be4eba11ea1c9800e12.tar.gz
bigpipe-903100ecb99ab926d4ac3be4eba11ea1c9800e12.tar.xz
bigpipe-903100ecb99ab926d4ac3be4eba11ea1c9800e12.zip
Namespaces added
-rwxr-xr-xinclude/classes/BigPipe/BigPipe.php (renamed from include/classes/class.bigpipe.php)2
-rwxr-xr-xinclude/classes/BigPipe/Pagelet.php (renamed from include/classes/class.pagelet.php)2
-rwxr-xr-xindex.php12
3 files changed, 10 insertions, 6 deletions
diff --git a/include/classes/class.bigpipe.php b/include/classes/BigPipe/BigPipe.php
index 1edefc8..b69f1d8 100755
--- a/include/classes/class.bigpipe.php
+++ b/include/classes/BigPipe/BigPipe.php
@@ -1,4 +1,6 @@
<?php
+namespace BigPipe;
+
class BigPipe {
public static $enabled = TRUE;
private static $pagelets = [];
diff --git a/include/classes/class.pagelet.php b/include/classes/BigPipe/Pagelet.php
index c1f211a..6fe0032 100755
--- a/include/classes/class.pagelet.php
+++ b/include/classes/BigPipe/Pagelet.php
@@ -1,4 +1,6 @@
<?php
+namespace BigPipe;
+
class Pagelet {
private $ID = NULL;
private $HTML = NULL;
diff --git a/index.php b/index.php
index 7f3de69..e8860d7 100755
--- a/index.php
+++ b/index.php
@@ -7,14 +7,14 @@ header('Cache-Control: no-cache, no-store, must-revalidate');
#====================================================================================================
# Klassen und Funktionen einbinden
#====================================================================================================
-require_once 'include/classes/class.bigpipe.php';
-require_once 'include/classes/class.pagelet.php';
+require_once 'include/classes/BigPipe/BigPipe.php';
+require_once 'include/classes/BigPipe/Pagelet.php';
require_once 'include/functions.php';
#====================================================================================================
# Pagelet mit rotem Hintergrund
#====================================================================================================
-$PageletRed = new Pagelet();
+$PageletRed = new BigPipe\Pagelet();
$PageletRed->addHTML('<section id="red" class="text">I AM JUST A PAGELET WITH RED BACKGROUND</section>');
$PageletRed->addCSS('static/red.php');
$PageletRed->addJS('static/delayJS.php');
@@ -23,7 +23,7 @@ $PageletRed->addJSCode("document.getElementById('red').innerHTML += ' [JS execut
#====================================================================================================
# Pagelet mit blauem Hintergrund
#====================================================================================================
-$PageletBlue = new Pagelet(60);
+$PageletBlue = new BigPipe\Pagelet(60);
$PageletBlue->addHTML('<section id="blue" class="text">I AM JUST A PAGELET WITH BLUE BACKGROUND</section>');
$PageletBlue->addCSS('static/blue.php');
$PageletBlue->addJS('static/delayJS.php');
@@ -32,7 +32,7 @@ $PageletBlue->addJSCode("document.getElementById('blue').innerHTML += ' [JS exec
#====================================================================================================
# Pagelet mit grünem Hintergrund
#====================================================================================================
-$PageletGreen = new Pagelet();
+$PageletGreen = new BigPipe\Pagelet();
$PageletGreen->addHTML('<section id="green" class="text">I AM JUST A PAGELET WITH GREEN BACKGROUND</section>');
$PageletGreen->addCSS('static/green.php');
$PageletGreen->addJS('static/delayJS.php');
@@ -73,7 +73,7 @@ echo $PageletGreen;
?>
<?php
-BigPipe::render();
+BigPipe\BigPipe::render();
?>
</body>
</html> \ No newline at end of file