public static function setDebugMode($debug = true) { self::$_debug = $debug; if (self::$_debug) { self::debug(__CLASS__ . ': debug mode activated'); } return self::$_debug; }