You are here

function lockr_autoload in Lockr 7

@file Lockr autoloader.

1 string reference to 'lockr_autoload'
autoload.php in ./autoload.php
Lockr autoloader.

File

./autoload.php, line 8
Lockr autoloader.

Code

function lockr_autoload($class) {
  if (substr($class, 0, 6) !== 'Lockr\\') {
    return FALSE;
  }
  $file = __DIR__ . '/src/' . str_replace('\\', '/', $class) . '.php';
  if (file_exists($file)) {
    include_once $file;
    return true;
  }
  return false;
}