1 | <?php |
||
8 | class EmojiParser extends AbstractInlineParser |
||
9 | { |
||
10 | /** |
||
11 | * The emoji mappings. |
||
12 | * |
||
13 | * @var array |
||
14 | */ |
||
15 | protected $map; |
||
16 | |||
17 | /** |
||
18 | * The emoji extension. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $ext = '.png'; |
||
23 | |||
24 | /** |
||
25 | * The emoji path directory. |
||
26 | * |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $path; |
||
30 | |||
31 | /** |
||
32 | * Create a new emoji parser instance. |
||
33 | * |
||
34 | * @return void |
||
|
|||
35 | */ |
||
36 | public function __construct() |
||
41 | |||
42 | /** |
||
43 | * Get the characters that must be matched. |
||
44 | * |
||
45 | * @return array |
||
46 | */ |
||
47 | public function getCharacters() |
||
51 | |||
52 | /** |
||
53 | * Parse a line and determine if it contains an emoji. If it does, |
||
54 | * then we do the necessary. |
||
55 | * |
||
56 | * @param \League\CommonMark\InlineParserContext $inlineContext |
||
57 | * |
||
58 | * @return bool |
||
59 | */ |
||
60 | public function parse(InlineParserContext $inlineContext) |
||
111 | } |
||
112 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.