/**
  *    register_autoloader
  *
  * @access    public
  * @param array | string $class_paths - array of key => value pairings between class names and paths
  * @param bool           $read_check true if we need to check whether the file is readable or not.
  * @param bool           $debug - set to true to display autoloader class => path mappings
  * @return void
  * @throws \EE_Error
  */
 public static function register_autoloader($class_paths, $read_check = true, $debug = false)
 {
     $class_paths = is_array($class_paths) ? $class_paths : array($class_paths);
     foreach ($class_paths as $class => $path) {
         // don't give up! you gotta...
         // get some class
         if (empty($class)) {
             throw new EE_Error(sprintf(__('No Class name was specified while registering an autoloader for the following path: %s.', 'event_espresso'), $path));
         }
         // one day you will find the path young grasshopper
         if (empty($path)) {
             throw new EE_Error(sprintf(__('No path was specified while registering an autoloader for the %s class.', 'event_espresso'), $class));
         }
         // is file readable ?
         if ($read_check && !is_readable($path)) {
             throw new EE_Error(sprintf(__('The file for the %s class could not be found or is not readable due to file permissions. Please ensure the following path is correct: %s', 'event_espresso'), $class, $path));
         }
         if (!isset(self::$_autoloaders[$class])) {
             self::$_autoloaders[$class] = str_replace(array('/', '\\'), DS, $path);
             if (WP_DEBUG && $debug) {
                 EEH_Debug_Tools::printr(self::$_autoloaders[$class], $class, __FILE__, __LINE__);
             }
         }
     }
 }
 /**
  *  _display_request_vars
  *
  * @access    protected
  * @return    void
  */
 protected function _display_request_vars()
 {
     if (!WP_DEBUG) {
         return;
     }
     EEH_Debug_Tools::printr($_REQUEST, '$_REQUEST', __FILE__, __LINE__);
     EEH_Debug_Tools::printr($this->checkout->step, '$this->checkout->step', __FILE__, __LINE__);
     EEH_Debug_Tools::printr($this->checkout->edit_step, '$this->checkout->edit_step', __FILE__, __LINE__);
     EEH_Debug_Tools::printr($this->checkout->action, '$this->checkout->action', __FILE__, __LINE__);
     EEH_Debug_Tools::printr($this->checkout->reg_url_link, '$this->checkout->reg_url_link', __FILE__, __LINE__);
     EEH_Debug_Tools::printr($this->checkout->revisit, '$this->checkout->revisit', __FILE__, __LINE__);
     EEH_Debug_Tools::printr($this->checkout->generate_reg_form, '$this->checkout->generate_reg_form', __FILE__, __LINE__);
     EEH_Debug_Tools::printr($this->checkout->process_form_submission, '$this->checkout->process_form_submission', __FILE__, __LINE__);
 }
 /**
  *    display_template_parts
  *
  * just for debugging purposes
  *
  * @access    public
  * @return string
  */
 public function display_template_parts()
 {
     if (WP_DEBUG) {
         $this->template_parts->rewind();
         while ($this->template_parts->valid()) {
             EEH_Debug_Tools::printr($this->template_parts->current(), 'template_part', __FILE__, __LINE__);
             $this->template_parts->next();
         }
     }
 }