Login   Register  
PHP Classes
elePHPant
Icontem

File: example1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Patxi Echarte  >  Class Loader  >  example1.php  >  Download  
File: example1.php
Role: Example script
Content type: text/plain
Description: Example
Class: Class Loader
Locate and load class files from a list of paths
Author: By
Last change:
Date: 2006-02-22 08:38
Size: 414 bytes
 

Contents

Class file image Download
<?php

include_once('ClassLoader.class.php');

$classLoader =& new ClassLoader();

// To this example works you must create the following folders 
$classLoader->addPath(dirname(__FILE__).'/includes'1);
$classLoader->addPath(dirname(__FILE__).'/admin'1);
$classLoader->start();

$classLoader->includeClass('MyClass.class.php');

echo 
"<pre>";
print_r($classLoader->_classes);
echo 
"</pre>";

?>