Now using a PSR-0-compatible autoloader.
This commit is contained in:
parent
a10d489199
commit
ca799f80fa
1 changed files with 4 additions and 2 deletions
|
|
@ -4,8 +4,10 @@
|
|||
# through the Markdown filter. You can adapt this sample code in any way
|
||||
# you like.
|
||||
|
||||
# Note: this line is only needed when PSR-0 class autoloading is not in place.
|
||||
require_once './Michelf/Markdown.php';
|
||||
# Install PSR-0-compatible class autoloader
|
||||
spl_autoload_register(function($class){
|
||||
require preg_replace('{\\\\|_(?!.*\\\\)}', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php';
|
||||
});
|
||||
|
||||
# Get Markdown class
|
||||
use \Michelf\Markdown;
|
||||
|
|
|
|||
Loading…
Reference in a new issue