Changed namespace to Michelf (capitalized).

This commit is contained in:
Michel Fortin 2013-01-21 07:51:51 -05:00
parent 03fe190545
commit 5511f94645
3 changed files with 26 additions and 16 deletions

View file

@ -10,17 +10,17 @@
# Copyright (c) 2004-2006 John Gruber
# <http://daringfireball.net/projects/markdown/>
#
namespace michelf;
namespace Michelf;
#
# The following constants are deprecated: avoid using them, they'll disappear
# soon.
#
# You can get the parser's version using the constant inside of the parser
# class: \michelf\Markdown::MARKDOWN_VERSION.
# class: \Michelf\Markdown::MARKDOWN_VERSION.
#
const MARKDOWNLIB_VERSION = "1.3-beta1"; # Sun 13 Jan 2013
const MARKDOWNLIB_VERSION = "1.3-beta3"; # Mon 21 Jan 2013
const MARKDOWN_VERSION = "1.0.1p"; # Sun 13 Jan 2013
const MARKDOWNEXTRA_VERSION = "1.2.6"; # Sun 13 Jan 2013
@ -33,7 +33,7 @@ class Markdown {
### Version ###
const MARKDOWN_VERSION = \michelf\MARKDOWN_VERSION;
const MARKDOWN_VERSION = \Michelf\MARKDOWN_VERSION;
### Simple Function Interface ###
@ -1531,12 +1531,12 @@ class Markdown {
# Currently the implementation of of Extra resides here in this temporary class.
# This makes it easier to propagate the changes between the three different
# packaging styles of PHP Markdown. When this issue is resolved, this
# MarkdownExtra_TmpImpl class here will disappear and \michelf\MarkdownExtra
# will contain the code. So please use \michelf\MarkdownExtra and ignore this
# MarkdownExtra_TmpImpl class here will disappear and \Michelf\MarkdownExtra
# will contain the code. So please use \Michelf\MarkdownExtra and ignore this
# one.
#
class _MarkdownExtra_TmpImpl extends \michelf\Markdown {
class _MarkdownExtra_TmpImpl extends \Michelf\Markdown {
### Configuration Variables ###

View file

@ -10,24 +10,24 @@
# Copyright (c) 2004-2006 John Gruber
# <http://daringfireball.net/projects/markdown/>
#
namespace michelf;
namespace Michelf;
#
# Markdown Extra Parser Class
#
# Note: Currently the implementation resides in the temporary class
# \michelf\MarkdownExtra_TmpImpl (in the same file as \michelf\Markdown).
# \Michelf\MarkdownExtra_TmpImpl (in the same file as \Michelf\Markdown).
# This makes it easier to propagate the changes between the three different
# packaging styles of PHP Markdown. Once this issue is resolved, the
# _MarkdownExtra_TmpImpl will disappear and this one will contain the code.
#
class MarkdownExtra extends \michelf\_MarkdownExtra_TmpImpl {
class MarkdownExtra extends \Michelf\_MarkdownExtra_TmpImpl {
### Version ###
const MARKDOWNEXTRA_VERSION = \michelf\MARKDOWNEXTRA_VERSION;
const MARKDOWNEXTRA_VERSION = \Michelf\MARKDOWNEXTRA_VERSION;
### Parser Implementation ###

View file

@ -50,22 +50,22 @@ Usage
-----
You can use PHP Markdown easily in your PHP program. This library package
is meant to be used with autoloading, so putting the 'michelf' folder
is meant to be used with autoloading, so putting the 'Michelf' folder
in your include path should be enough for this to work:
use \michelf\Markdown;
use \Michelf\Markdown;
$my_html = Markdown::defaultTransform($my_text);
PHP Markdown Extra is also available the same way:
use \michelf\MarkdownExtra;
use \Michelf\MarkdownExtra;
$my_html = MarkdownExtra::defaultTransform($my_text);
If you wish to use PHP Markdown with another text filter function
built to parse HTML, you should filter the text *after* the Markdown
function call. This is an example with [PHP SmartyPants][psp]:
use \michelf\Markdown, \michelf\SmartyPants;
use \Michelf\Markdown, \Michelf\SmartyPants;
$my_html = Markdown::defaultTransform($my_text);
$my_html = SmartyPants::defaultTransform($my_html);
@ -73,7 +73,7 @@ All these examples are using the static `markdown` function found inside the
parser class. If you want to customize the parser, you can also instantiate
it directly and change some configuration variables:
use \michelf\MarkdownExtra;
use \Michelf\MarkdownExtra;
$parser = new MarkdownExtra;
$parser->fn_id_prefix = "post22-";
$my_html = $parser->transform($my_text);
@ -112,6 +112,16 @@ See Installation and Requirement above for details.
Version History
---------------
Lib 1.3-beta3 (21 Jan 2013):
* Changed namespace name from michelf (lowercase) to Michelf (capitalized).
Lib 1.3-beta2 (14 Jan 2013):
* Fixed missing autoloading information for composer.
Lib 1.3-beta1 (13 Jan 2013):
Extra 1.2.6 (13 Jan 2013):