/**
  * load_reg_steps
  * loads and instantiates each reg step based on the EE_Registry::instance()->CFG->registration->reg_steps array
  *
  * @access    private
  * @throws EE_Error
  * @return    array
  */
 public static function load_reg_steps()
 {
     static $reg_steps_loaded = FALSE;
     if ($reg_steps_loaded) {
         return;
     }
     // load EE_SPCO_Reg_Step base class
     //		EE_Registry::instance()->load_file( SPCO_INC_PATH, 'EE_SPCO_Reg_Step', 'class'  );
     // filter list of reg_steps
     $reg_steps_to_load = apply_filters('AHEE__SPCO__load_reg_steps__reg_steps_to_load', EED_Single_Page_Checkout::get_reg_steps());
     // sort by key (order)
     ksort($reg_steps_to_load);
     // loop through folders
     foreach ($reg_steps_to_load as $order => $reg_step) {
         // we need a
         if (isset($reg_step['file_path'], $reg_step['class_name'], $reg_step['slug'])) {
             // copy over to the reg_steps_array
             EED_Single_Page_Checkout::$_reg_steps_array[$order] = $reg_step;
             // register custom key route for each reg step ( ie: step=>"slug" - this is the entire reason we load the reg steps array now )
             EE_Config::register_route($reg_step['slug'], 'EED_Single_Page_Checkout', 'run', 'step');
             // add AJAX or other hooks
             if (isset($reg_step['has_hooks']) && $reg_step['has_hooks']) {
                 // setup autoloaders if necessary
                 if (!class_exists($reg_step['class_name'])) {
                     EEH_Autoloader::register_autoloaders_for_each_file_in_folder($reg_step['file_path'], TRUE);
                 }
                 if (is_callable($reg_step['class_name'], 'set_hooks')) {
                     call_user_func(array($reg_step['class_name'], 'set_hooks'));
                 }
             }
         }
     }
     $reg_steps_loaded = TRUE;
 }