parent
cee0b029c8
commit
eed120d39a
4 changed files with 46 additions and 0 deletions
10
Michelf/Markdown.inc.php
Normal file
10
Michelf/Markdown.inc.php
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
# Use this file if you cannot use class autoloading. It will include all the
|
||||
# files needed for the Markdown parser.
|
||||
#
|
||||
# Take a look at the PSR-0-compatible class autoloading implementation
|
||||
# in the Readme.php file if you want a simple autoloader setup.
|
||||
|
||||
require_once dirname(__FILE__) . '/MarkdownInterface.php';
|
||||
require_once dirname(__FILE__) . '/Markdown.php';
|
||||
11
Michelf/MarkdownExtra.inc.php
Normal file
11
Michelf/MarkdownExtra.inc.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
# Use this file if you cannot use class autoloading. It will include all the
|
||||
# files needed for the MarkdownExtra parser.
|
||||
#
|
||||
# Take a look at the PSR-0-compatible class autoloading implementation
|
||||
# in the Readme.php file if you want a simple autoloader setup.
|
||||
|
||||
require_once dirname(__FILE__) . '/MarkdownInterface.php';
|
||||
require_once dirname(__FILE__) . '/Markdown.php';
|
||||
require_once dirname(__FILE__) . '/MarkdownExtra.php';
|
||||
9
Michelf/MarkdownInterface.inc.php
Normal file
9
Michelf/MarkdownInterface.inc.php
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
# Use this file if you cannot use class autoloading. It will include all the
|
||||
# files needed for the MarkdownInterface interface.
|
||||
#
|
||||
# Take a look at the PSR-0-compatible class autoloading implementation
|
||||
# in the Readme.php file if you want a simple autoloader setup.
|
||||
|
||||
require_once dirname(__FILE__) . '/MarkdownInterface.php';
|
||||
16
Readme.md
16
Readme.md
|
|
@ -85,6 +85,22 @@ To learn more, see the full list of [configuration variables].
|
|||
[configuration variables]: http://michelf.ca/projects/php-markdown/configuration/
|
||||
|
||||
|
||||
### Usage without an autoloader
|
||||
|
||||
If you cannot use class autoloading, you can still use `include` or `require`
|
||||
to access the parser. To load the `\Michelf\Markdown` parser, do it this way:
|
||||
|
||||
require_once 'Michelf/Markdown.inc.php';
|
||||
|
||||
Or, if you need the `\Michelf\MarkdownExtra` parser:
|
||||
|
||||
require_once 'Michelf/MarkdownExtra.inc.php';
|
||||
|
||||
While the plain `.php` files depend on autoloading to work correctly, using the
|
||||
`.inc.php` files instead will eagerly load the dependencies that would be
|
||||
loaded on demand if you were using autoloading.
|
||||
|
||||
|
||||
Public API and Versioning Policy
|
||||
---------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue