You are here

public static function Mollie_API_Autoloader::autoload in Commerce Mollie 7

Parameters

string $class_name:

File

Mollie/API/Autoloader.php, line 37

Class

Mollie_API_Autoloader
Copyright (c) 2013, Mollie B.V. All rights reserved.

Code

public static function autoload($class_name) {
  if (strpos($class_name, "Mollie_") === 0) {
    $file_name = str_replace("_", "/", $class_name);
    $file_name = realpath(dirname(__FILE__) . "/../../{$file_name}.php");
    if (file_exists($file_name)) {
      require $file_name;
    }
  }
}