/**
  * Returns an array of xComponent objects  representing all existing compoenents \n
  */
 function find_existing()
 {
     $components = array();
     //read additional module directory
     $dir = './engine/components';
     $dir_list = xanth_list_dirs($dir);
     if (is_array($dir_list)) {
         foreach ($dir_list as $raw_component) {
             $components[] = new xComponent($raw_component['path'], $raw_component['name']);
         }
     } else {
         xanth_log(LOG_LEVEL_FATAL_ERROR, "Component directory {$dir} not found", "Core", __FUNCTION__);
     }
     return $components;
 }
 /**
  * Returns an array of xModule objects  representing all existing modules \n
  */
 function find_existing()
 {
     $modules = array();
     //read additional module directory
     $dir = './modules/';
     $dir_list = xanth_list_dirs($dir);
     if (is_array($dir_list)) {
         foreach ($dir_list as $raw_module) {
             $modules[] = new xModule($raw_module['path'], $raw_module['name']);
         }
     } else {
         xanth_log(LOG_LEVEL_FATAL_ERROR, "Module directory {$dir} not found", "Core", __FILE__, __LINE__);
     }
     return $modules;
 }