1 | <?php |
||
11 | class PhpCode extends Extractor implements ExtractorInterface |
||
12 | { |
||
13 | public static $options = [ |
||
14 | // - false: to not extract comments |
||
15 | // - empty string: to extract all comments |
||
16 | // - non-empty string: to extract comments that start with that string |
||
17 | // - array with strings to extract comments format. |
||
18 | 'extractComments' => false, |
||
19 | |||
20 | 'constants' => [], |
||
21 | |||
22 | 'functions' => [ |
||
23 | 'gettext' => 'gettext', |
||
24 | '__' => 'gettext', |
||
25 | 'ngettext' => 'ngettext', |
||
26 | 'n__' => 'ngettext', |
||
27 | 'pgettext' => 'pgettext', |
||
28 | 'p__' => 'pgettext', |
||
29 | 'dgettext' => 'dgettext', |
||
30 | 'd__' => 'dgettext', |
||
31 | 'dngettext' => 'dngettext', |
||
32 | 'dn__' => 'dngettext', |
||
33 | 'dpgettext' => 'dpgettext', |
||
34 | 'dp__' => 'dpgettext', |
||
35 | 'npgettext' => 'npgettext', |
||
36 | 'np__' => 'npgettext', |
||
37 | 'dnpgettext' => 'dnpgettext', |
||
38 | 'dnp__' => 'dnpgettext', |
||
39 | 'noop' => 'noop', |
||
40 | 'noop__' => 'noop', |
||
41 | ], |
||
42 | ]; |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | public static function fromString($string, Translations $translations, array $options = []) |
||
59 | |||
60 | /** |
||
61 | * Decodes a T_CONSTANT_ENCAPSED_STRING string. |
||
62 | * |
||
63 | * @param string $value |
||
64 | * |
||
65 | * @return string |
||
66 | */ |
||
67 | public static function convertString($value) |
||
112 | |||
113 | //http://php.net/manual/en/function.chr.php#118804 |
||
114 | private static function unicodeChar($dec) |
||
138 | } |
||
139 |