diff options
Diffstat (limited to 'include/classes/Application.php')
-rw-r--r-- | include/classes/Application.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/classes/Application.php b/include/classes/Application.php new file mode 100644 index 0000000..d6ef6c5 --- /dev/null +++ b/include/classes/Application.php @@ -0,0 +1,38 @@ +<?php +class Application { + public static $debugging = FALSE; + + #=============================================================================== + # Create Pagelet instance + #=============================================================================== + public static function createPagelet($ID = NULL): BigPipe\Pagelet { + $namespace = self::$debugging ? 'Debugging' : 'BigPipe'; + $classname = "{$namespace}\Pagelet"; + + $Pagelet = new $classname(...func_get_args()); + return $Pagelet; + } + + #=============================================================================== + # Create Stylesheet instance + #=============================================================================== + public static function createStylesheet($ID, $href): BigPipe\Resource\Stylesheet { + $namespace = self::$debugging ? 'Debugging' : 'BigPipe'; + $classname = "{$namespace}\Resource\Stylesheet"; + + $Stylesheet = new $classname(...func_get_args()); + return $Stylesheet; + } + + #=============================================================================== + # Create Javascript instance + #=============================================================================== + public static function createJavascript($ID, $href): BigPipe\Resource\Javascript { + $namespace = self::$debugging ? 'Debugging' : 'BigPipe'; + $classname = "{$namespace}\Resource\Javascript"; + + $Javascript = new $classname(...func_get_args()); + return $Javascript; + } +} +?>
\ No newline at end of file |