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


Class file image Download

// Include ClassLoader
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\\');


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