From c795a4aacbc44763e4e3c61b6672c5336bac5429 Mon Sep 17 00:00:00 2001 From: rylon Date: Sat, 6 Jun 2015 20:22:51 +0200 Subject: [PATCH] lib framework, michelf lib restructure, saimod docu update, sai better error messages --- lib/Michelf/autoload.inc | 3 +++ lib/Michelf/{ => lib}/Markdown.php | 0 lib/Michelf/{ => lib}/MarkdownExtra.php | 0 lib/Michelf/{ => lib}/extra/License.md | 0 lib/Michelf/{ => lib}/extra/Readme.md | 0 lib/Michelf/{ => lib}/extra/Readme.php | 0 lib/Michelf/{ => lib}/extra/composer.json | 0 lib/Michelf/lib_michelf.php | 10 ++++++++++ lib/autoload.inc | 3 ++- lib/lib.php | 18 ++++++++++++++++++ lib/lib_controll.php | 17 +++++++++++++++++ lib/lib_css.php | 5 +++++ lib/lib_js.php | 5 +++++ lib/lib_jscss.php | 6 ++++++ lib/lib_php.php | 8 ++++++++ .../saimod_sys_docu/saimod_sys_docu.php | 1 + sai/sai/sai.php | 6 +++--- 17 files changed, 78 insertions(+), 4 deletions(-) create mode 100644 lib/Michelf/autoload.inc rename lib/Michelf/{ => lib}/Markdown.php (100%) rename lib/Michelf/{ => lib}/MarkdownExtra.php (100%) rename lib/Michelf/{ => lib}/extra/License.md (100%) rename lib/Michelf/{ => lib}/extra/Readme.md (100%) rename lib/Michelf/{ => lib}/extra/Readme.php (100%) rename lib/Michelf/{ => lib}/extra/composer.json (100%) create mode 100644 lib/Michelf/lib_michelf.php create mode 100644 lib/lib.php create mode 100644 lib/lib_controll.php create mode 100644 lib/lib_css.php create mode 100644 lib/lib_js.php create mode 100644 lib/lib_jscss.php create mode 100644 lib/lib_php.php diff --git a/lib/Michelf/autoload.inc b/lib/Michelf/autoload.inc new file mode 100644 index 0000000..d9efc88 --- /dev/null +++ b/lib/Michelf/autoload.inc @@ -0,0 +1,3 @@ + PLIB object? +//or mask all paths using api +abstract class lib_php extends lib{ + protected static function php_autoload(){} //autload magic? require_once lib\autoload.inc -> should do the trick -> do that in lib +} + diff --git a/sai/modules/saimod_sys_docu/saimod_sys_docu.php b/sai/modules/saimod_sys_docu/saimod_sys_docu.php index 9ec4c5d..a670459 100644 --- a/sai/modules/saimod_sys_docu/saimod_sys_docu.php +++ b/sai/modules/saimod_sys_docu/saimod_sys_docu.php @@ -25,6 +25,7 @@ class saimod_sys_docu extends \SYSTEM\SAI\SaiModule { } public static function sai_mod__SYSTEM_SAI_saimod_sys_docu_action_doc($cat = 'System',$doc = '1_system_md'){ + \LIB\lib_michelf::php(); $document = \SYSTEM\DOCU\docu::getDocuments()[$cat]; foreach($document as $docu){ if(str_replace(array('.',' ','\\','/'), '_', basename($docu)) == $doc){ diff --git a/sai/sai/sai.php b/sai/sai/sai.php index 9c4cad9..4be260e 100644 --- a/sai/sai/sai.php +++ b/sai/sai/sai.php @@ -16,15 +16,15 @@ class sai { public static function register_start($module){ if(!self::check_module($module)){ - throw new \SYSTEM\LOG\ERROR('Problem with your Sysmodule class: '.$module);} + throw new \SYSTEM\LOG\ERROR('Problem with your Sysmodule class: '.$module.'; it might not be available or inherits from the wrong class!');} self::$module_start = $module;} public static function register($module){ if(!self::check_module($module)){ - throw new \SYSTEM\LOG\ERROR('Problem with your Sysmodule class: '.$module);} + throw new \SYSTEM\LOG\ERROR('Problem with your Sysmodule class: '.$module.'; it might not be available or inherits from the wrong class!');} array_push(self::$modules,$module);} public static function register_sys($module){ if(!self::check_module($module)){ - throw new \SYSTEM\LOG\ERROR('Problem with your Sysmodule class: '.$module);} + throw new \SYSTEM\LOG\ERROR('Problem with your Sysmodule class: '.$module.'; it might not be available or inherits from the wrong class!');} array_push(self::$modules_sys,$module);} public static function getStartModule(){