Permalink
Browse files

Adding bootstrap.

  • Loading branch information...
1 parent 5710a7a commit 04cdd6138545e69d4c3294b8fed9d0070c904eab @davidpersson committed Feb 7, 2013
Showing with 28 additions and 0 deletions.
  1. +5 −0 README
  2. +23 −0 bootstrap.php
View
5 README
@@ -39,6 +39,11 @@ Versions & Requirements
-----------------------
Version 1.0.0, PHP >=5.3.0
+Installation
+------------
+Classes in this library can be autoloaded. In order to enable autoloading you
+must bootstrap the library with the included `bootstrap.php` file.
+
Usage
-----
<?php
View
@@ -0,0 +1,23 @@
+<?php
+/**
+ * markup
+ *
+ * Copyright (c) 2012-2013 David Persson
+ *
+ * Distributed under the terms of the MIT License.
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright 2011-2013 David Persson <nperson@gmx.de>
+ * @license http://opensource.org/licenses/mit-license The MIT License
+ * @link http://github.com/davidpersson/markdown
+ */
+
+spl_autoload_register(function($class) {
+ $file = __DIR__ . '/src/' . $class . '.php';
+
+ if (file_exists($file)) {
+ require_once $file;
+ }
+});
+
+?>

0 comments on commit 04cdd61

Please sign in to comment.