PHP Classes

File: autoload.php

Recommend this page to a friend!
  Classes of Rafal Przetakowski   Simple SQL query manager   autoload.php   Download  
File: autoload.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Simple SQL query manager
Compose SQL queries read from template files
Author: By
Last change: Update of autoload.php
Date: 8 months ago
Size: 555 bytes
 

Contents

Class file image Download
<?php

$vendors
= __DIR__ . '/vendor/autoload.php';
if (
file_exists($vendors)) {
    require(
$vendors);
}
/**
 * Registers an autoload for all the classes in Beeflow\\JsonManager
 */
spl_autoload_register(function ($className) {
   
$namespace = 'Beeflow\\SQLQueryManager';
    if (
strpos($className, $namespace) === 0) {
       
$className = str_replace($namespace, '', $className);
       
$fileName = __DIR__ . '/' . str_replace('\\', '/', $className) . '.php';
        if (
file_exists($fileName)) {
            require(
$fileName);
        }
    }
});