1 | <?php |
||
40 | final class Reflector |
||
41 | { |
||
42 | private const KNOWN_INTERNAL_CONSTANTS = [ |
||
43 | 'CURLM_ADDED_ALREADY' => true, |
||
44 | 'JSON_UNESCAPED_LINE_TERMINATORS' => true, |
||
45 | 'OPENSSL_DONT_ZERO_PAD_KEY' => true, |
||
46 | 'PHP_FD_SETSIZE' => true, |
||
47 | 'PHP_INT_MIN' => true, |
||
48 | 'PHP_OS_FAMILY' => true, |
||
49 | ]; |
||
50 | |||
51 | private const KNOWN_INTERNAL_FUNCTIONS = [ |
||
52 | 'deflate_add' => true, |
||
53 | 'deflate_init' => true, |
||
54 | 'error_clear_last' => true, |
||
55 | 'ftp_append' => true, |
||
56 | 'hash_hkdf' => true, |
||
57 | 'inflate_add' => true, |
||
58 | 'inflate_init' => true, |
||
59 | 'intdiv' => true, |
||
60 | 'is_iterable' => true, |
||
61 | 'openssl_pkcs7_read' => true, |
||
62 | 'pcntl_signal_get_handler' => true, |
||
63 | 'preg_replace_callback_array' => true, |
||
64 | 'sapi_windows_vt100_support' => true, |
||
65 | 'socket_export_stream' => true, |
||
66 | 'spl_object_id' => true, |
||
67 | 'stream_isatty' => true, |
||
68 | 'utf8_decode' => true, |
||
69 | 'utf8_encode' => true, |
||
70 | ]; |
||
71 | |||
72 | private $classReflector; |
||
73 | private $constants; |
||
74 | |||
75 | 32 | public function __construct(ClassReflector $classReflector) |
|
79 | |||
80 | 6 | public function isClassInternal(string $name): bool |
|
88 | |||
89 | 11 | public function isFunctionInternal(string $name): bool |
|
101 | |||
102 | 9 | public function isConstantInternal(string $name): bool |
|
110 | |||
111 | 8 | private function getInternalConstants(): array |
|
125 | } |
||
126 |