Skip to content

Instantly share code, notes, and snippets.

@netcarver
Created March 26, 2012 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netcarver/2207686 to your computer and use it in GitHub Desktop.
Save netcarver/2207686 to your computer and use it in GitHub Desktop.
Flourish autoloader for ProcessWire
<?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