summaryrefslogtreecommitdiffstats
path: root/docs/tutorial/tutorial_autoload.php
blob: 56e36e1d32beacaf93084d150e4a89e41d6cd7e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
$dir = dirname( __FILE__ );
$dirParts = explode( DIRECTORY_SEPARATOR, $dir );
switch ( $dirParts[count( $dirParts ) - 3] )
{
    case 'doc': require_once 'ezc/Base/base.php'; break; // pear
    case 'trunk': require_once "$dir/../../../Base/src/base.php"; break; // svn
    default: require_once "$dir/../../../Base/src/base.php"; break; // bundle
}

/**
 * Autoload ezc classes 
 * 
 * @param string $className 
 */
function __autoload( $className )
{
    ezcBase::autoload( $className );
}
?>
OpenPOWER on IntegriCloud