Created
March 26, 2012 17:53
-
-
Save netcarver/2207686 to your computer and use it in GitHub Desktop.
Flourish autoloader for ProcessWire
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function flourish_loader( $class_name ) | |
{ | |
// Customize this to your root Flourish directory | |
$flourish_root = $_SERVER['DOCUMENT_ROOT'] . 'site/.flourish/'; | |
$file = $flourish_root . $class_name . '.php'; | |
if (file_exists($file)) { | |
include $file; | |
} | |
} | |
spl_autoload_register( 'flourish_loader', true ); | |
#eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment