You are here

autoload.php in Lockr 7

Lockr autoloader.

File

autoload.php
View source
<?php

/**
 * @file
 * Lockr autoloader.
 */
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;
}
spl_autoload_register('lockr_autoload');

Functions

Namesort descending Description
lockr_autoload @file Lockr autoloader.