gfpaystation_autoload

Autoload classes as/when needed.

Description

gfpaystation_autoload( (string) $class_name ); 

Parameters (1)

0. $class_name (string)
Name of class to attempt to load

Usage

  1. if ( !function_exists( 'gfpaystation_autoload' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'gravity-forms-paystation-3-party-hosted/gravityforms-paystation.php'; 
  3.  
  4. // name of class to attempt to load 
  5. $class_name = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gfpaystation_autoload($class_name); 
  9.  

Defined (1)

The function is defined in the following location(s).

/gravityforms-paystation.php  
  1. function gfpaystation_autoload($class_name) { 
  2. static $classMap = array ( 
  3. 'GFPaystationAdmin' => 'class.GFPaystationAdmin.php',  
  4. 'GFPaystationFeed' => 'class.GFPaystationFeed.php',  
  5. 'GFPaystationFeedAdmin' => 'class.GFPaystationFeedAdmin.php',  
  6. 'GFPaystationFormData' => 'class.GFPaystationFormData.php',  
  7. 'GFPaystationOptionsAdmin' => 'class.GFPaystationOptionsAdmin.php',  
  8. 'GFPaystationPayment' => 'class.GFPaystationPayment.php',  
  9. 'GFPaystationPlugin' => 'class.GFPaystationPlugin.php',  
  10. 'GFPaystationReturnResult' => 'class.GFPaystationReturnResult.php',  
  11. 'GFPaystationPostbackResult' => 'class.GFPaystationPostbackResult.php',  
  12. ); 
  13.  
  14. if (isset($classMap[$class_name])) { 
  15. require GFPAYSTATION_PLUGIN_ROOT . $classMap[$class_name];