PHP Classes

File: dist/php/autoload.php

Recommend this page to a friend!
  Classes of Leonardo Mauro Pereira Moraes  >  FPHP Loader  >  dist/php/autoload.php  >  Download  
File: dist/php/autoload.php
Role: Configuration script
Content type: text/plain
Description: Configuration script
Class: FPHP Loader
Load one or more PHP scripts from a directory
Author: By
Last change:
Date: 5 years ago
Size: 438 bytes
 

Contents

Class file image Download
<?php

// Include ClassLoader
require('/fphp/loader/ClassLoader.php');
use \
FPHP_Loader\ClassLoader as ClassLoader;

// Define root `./php/` of classes files
$root = str_replace('\\', DIRECTORY_SEPARATOR, realpath(dirname(__FILE__))).DIRECTORY_SEPARATOR;

// Register ClassLoader
$loader = new ClassLoader($root);
$loader->add_prefix('Villain', 'example\\');
$loader->add_prefix('FPHP_Loader', 'fphp\\loader\\');
$loader->register();

?>

For more information send a message to info at phpclasses dot org.