PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ersun Özer  >  PHP Autoload Class Files  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example file
Class: PHP Autoload Class Files
Automatically load class files from directories
Author: By
Last change: added new function debug()
Date: 2 years ago
Size: 604 bytes
 

Contents

Class file image Download
<?php
/**
 * @project 003
 * @file example
 * @datetime 22:5:2013-9:2
 */
   
define('ROOT', realpath(dirname(__FILE__)));
   
$ext = array('.php', '.class.php', '.inc.php');
   
   
$dir = array(
   
'application'=>ROOT.'/application',
   
'base'=>ROOT.'/base',
   
'core'=>ROOT.'/core',
   
'libraries'=>ROOT.'/libraries'
   
);
   
   
$loaded = new Loader($dir, $ext);
 
 
// TEST :
 
echo '<pre>';
 
 
$loaded->debug();

 echo
'</pre>';

 
/*
like this

loaded class :3

Array
(
    [registry] => library
    [mysql] => library
    [backup] => library
)

*/

?>