mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
5f40cab3e7
Fixes erusev/parsedown-extra#67. This introduces PHP 5.3+ late static binding to the Singleton pattern in Parsedown. It will return an instance of Parsedown which inherits the class which called the `instance()` method rather than always returning instance of just `Parsedown`. Tests are testing this feature with a test class which inherits from Parsedown. Notice that calling `instance()` with the default arguments after an instance of `Parsedown` was already created, it will return it even though it is from just an instance of `Parsedown`. So this is fixing the problem just partially.
6 lines
49 B
PHP
6 lines
49 B
PHP
<?php
|
|
|
|
class TestParsedown extends Parsedown
|
|
{
|
|
}
|