diff --git a/Core/System/class.config.php b/Core/System/class.config.php index 540285b..f16d69b 100644 --- a/Core/System/class.config.php +++ b/Core/System/class.config.php @@ -4,9 +4,9 @@ namespace FuzeWorks; use \Exception; /** - * Config Module + * Config Class * - * This class gives access to the config files. Allows for reading and editting + * This class gives access to the config files. Can read and write .php files with an array in a file */ class Config extends Bus{ diff --git a/Core/System/class.core.php b/Core/System/class.core.php index be4bff2..5d40ed3 100644 --- a/Core/System/class.core.php +++ b/Core/System/class.core.php @@ -9,8 +9,11 @@ if (!defined('FUZESYSPATH')) { define( 'FUZESYSPATH', dirname(__FILE__) . '/' ); } -// NotifierEvent, base event -// Framework +/** + * FuzeWorks Core + * + * Holds all the modules and starts the framework. Allows for starting and managing modules + */ class Core { public $mods; diff --git a/Core/System/class.events.php b/Core/System/class.events.php index 53bd4ba..18e3212 100644 --- a/Core/System/class.events.php +++ b/Core/System/class.events.php @@ -8,8 +8,16 @@ namespace FuzeWorks; use \Exception; /** - * @name Events -*/ + * Event Class + * + * Controls FuzeWorks Events. Events are classes that get loaded during special moments in the program. + * These Event objects get send to so-called 'listeners', which can modify the event object, and eventually return them to invoker. + * Typically an event process goes like this: + * - Event get's called + * - Event object is created + * - Event object is send to all listeners in order of EventPriority + * - Event is returned + */ class Events extends Bus{ private $listeners; diff --git a/Core/System/class.layout.php b/Core/System/class.layout.php index 0539d6e..3f942a3 100644 --- a/Core/System/class.layout.php +++ b/Core/System/class.layout.php @@ -3,6 +3,14 @@ namespace FuzeWorks; use \Exception; +/** + * Layout Class + * + * The Layout class is a wrapper for the Smarty Template engine. Smarty loads .tpl files and variables, and converts them to HTML. + * See the Smarty documentation for more information + * This class typically loads files from Application/Views unless specified otherwise. + * + */ class Layout extends Bus { private $Smarty = array(); diff --git a/Core/System/class.logger.php b/Core/System/class.logger.php index 0feb59f..479b1f2 100644 --- a/Core/System/class.logger.php +++ b/Core/System/class.logger.php @@ -3,6 +3,12 @@ namespace FuzeWorks; use \Exception; +/** + * Logger Class + * + * The main tool to handle errors and exceptions. Provides some tools for debugging and tracking where errors take place + * All fatal errors get catched by this class and get displayed if configured to do so. + */ class Logger extends Bus{ public $infoErrors = array(); @@ -40,6 +46,7 @@ class Logger extends Bus{ // Log it! $this->errorHandler($errno, $errstr, $errfile, $errline); + $this->logInfo($this->backtrace()); } if ($this->mods->config->error->debug == true || $this->print_to_screen) { @@ -91,6 +98,13 @@ class Logger extends Bus{ } public function logToScreen() { + // Send a screenLogEvent, allows for new screen log designs + $event = $this->mods->events->fireEvent('screenLogEvent'); + if ($event->isCancelled()) { + return false; + } + + // Otherwise just load it echo '