@@ -271,6 +271,11 @@ public static function getConfig(): ConfigurationDriver {
271271 public static function getConfigDriver () : string {
272272 return self ::$ ConfigDriver ;
273273 }
274+ /**
275+ * Calculates application root path by removing vendor framework path from current directory.
276+ *
277+ * @return string The application root path.
278+ */
274279 private static function getRoot () {
275280 //Following lines of code assumes that the class exist on the folder:
276281 //\vendor\WebFiori\framework\WebFiori\Framework
@@ -367,7 +372,7 @@ public static function initiate(string $appFolder = 'App', string $publicFolder
367372 /**
368373 * Path to WebFiori's core library.
369374 */
370- define ('WF_CORE_PATH ' , ROOT_PATH .DS .'vendor ' .DS .'WebFiori ' .DS .'framework ' .DS .'WebFiori ' .DS .'framework ' );
375+ define ('WF_CORE_PATH ' , ROOT_PATH .DS .'vendor ' .DS .'webfiori ' .DS .'framework ' .DS .'WebFiori ' .DS .'Framework ' );
371376 }
372377 self ::initAutoLoader ();
373378 self ::checkStandardLibs ();
@@ -472,6 +477,11 @@ public static function start(): App {
472477
473478 return self ::$ LC ;
474479 }
480+ /**
481+ * Helper for automatic class registration using reflection with configuration options.
482+ *
483+ * @param array $options Configuration array with dir, php-file, folder, class-name, params, callback, constructor-params.
484+ */
475485 private static function autoRegisterHelper ($ options ) {
476486 $ dir = $ options ['dir ' ];
477487 $ phpFile = $ options ['php-file ' ];
@@ -498,6 +508,11 @@ private static function autoRegisterHelper($options) {
498508 } catch (Error $ ex ) {
499509 }
500510 }
511+ /**
512+ * Safe function caller with CLI/web-aware exception handling.
513+ *
514+ * @param callable $func The function to call.
515+ */
501516 private static function call ($ func ) {
502517 try {
503518 call_user_func ($ func );
@@ -509,6 +524,9 @@ private static function call($func) {
509524 }
510525 }
511526 }
527+ /**
528+ * Validates and defines APP_DIR constant, checking for invalid characters.
529+ */
512530 private function checkAppDir () {
513531
514532 if (!defined ('APP_DIR ' )) {
@@ -616,6 +634,10 @@ private static function initAutoLoader() {
616634 */
617635 if (!class_exists ('WebFiori\Framework\Autoload\ClassLoader ' ,false )) {
618636 $ autoloader = WF_CORE_PATH .DIRECTORY_SEPARATOR .'Autoload ' .DIRECTORY_SEPARATOR .'ClassLoader.php ' ;
637+
638+ if (!file_exists ($ autoloader )) {
639+ throw new \Exception ('Unable to locate the autoloader class. ' );
640+ }
619641 require_once $ autoloader ;
620642 }
621643 self ::$ AU = ClassLoader::get ();
@@ -642,7 +664,7 @@ public static function initFrameworkVersionInfo() {
642664 *
643665 * @since 2.1
644666 */
645- define ('WF_VERSION ' , '3.0.0-Beta.30 ' );
667+ define ('WF_VERSION ' , '3.0.0-beta.31 ' );
646668 /**
647669 * A constant that tells the type of framework version.
648670 *
@@ -658,7 +680,7 @@ public static function initFrameworkVersionInfo() {
658680 *
659681 * @since 2.1
660682 */
661- define ('WF_RELEASE_DATE ' , '2025-10-22 ' );
683+ define ('WF_RELEASE_DATE ' , '2025-10-28 ' );
662684 }
663685
664686 /**
@@ -719,6 +741,9 @@ private function initScheduler() {
719741 TasksManager::registerTasks ();
720742 }
721743 }
744+ /**
745+ * Defines THEMES_PATH constant pointing to the themes directory.
746+ */
722747 private function initThemesPath () {
723748 if (!defined ('THEMES_PATH ' )) {
724749 $ themesDirName = 'Themes ' ;
0 commit comments