1 | <?php |
||
24 | class Settings { |
||
25 | |||
26 | |||
27 | /** @var array settings options */ |
||
28 | private static $options = []; |
||
29 | |||
30 | |||
31 | /** |
||
32 | * Gets the settings option key. |
||
33 | * |
||
34 | * @since 1.6.0 |
||
35 | * |
||
36 | * @return string |
||
37 | */ |
||
38 | public static function get_settings_key() { |
||
42 | |||
43 | |||
44 | /** |
||
45 | * Gets the plugin settings. |
||
46 | * |
||
47 | * @since 1.6.0 |
||
48 | * |
||
49 | * @return array associative array of key-values |
||
50 | */ |
||
51 | public static function get_settings() { |
||
70 | |||
71 | |||
72 | /** |
||
73 | * Gets the restricted IP(s), if set. |
||
74 | * |
||
75 | * @since 1.6.0 |
||
76 | * |
||
77 | * @return string[] array of individual IPs or ranges of IPs |
||
78 | */ |
||
79 | public static function get_allowed_ip_masks() { |
||
85 | |||
86 | |||
87 | /** |
||
88 | * Gets the PHP Console terminal password. |
||
89 | * |
||
90 | * @since 1.6.0 |
||
91 | * |
||
92 | * @return string |
||
93 | */ |
||
94 | public static function get_eval_terminal_password() { |
||
98 | |||
99 | |||
100 | /** |
||
101 | * Determines whether a password exists and is not empty. |
||
102 | * |
||
103 | * @since 1.6.0 |
||
104 | * |
||
105 | * @return bool |
||
106 | */ |
||
107 | public static function has_eval_terminal_password() { |
||
113 | |||
114 | |||
115 | /** |
||
116 | * Determines whether the PC class should be registered and made available. |
||
117 | * |
||
118 | * @since 1.6.0 |
||
119 | * |
||
120 | * @return bool |
||
121 | */ |
||
122 | public static function should_register_pc_class() { |
||
126 | |||
127 | |||
128 | /** |
||
129 | * Determines whether PHP Console should only accept secure connections. |
||
130 | * |
||
131 | * @since 1.6.0 |
||
132 | * |
||
133 | * @return bool |
||
134 | */ |
||
135 | public static function should_use_ssl_only() { |
||
139 | |||
140 | |||
141 | /** |
||
142 | * Determines whether the full call stack should be displayed. |
||
143 | * |
||
144 | * @since 1.6.0 |
||
145 | * |
||
146 | * @return bool |
||
147 | */ |
||
148 | public static function should_show_call_stack() { |
||
152 | |||
153 | |||
154 | /** |
||
155 | * Determines whether the length of PHP Console error sources should be shortened. |
||
156 | * |
||
157 | * @since 1.6.0 |
||
158 | * |
||
159 | * @return bool |
||
160 | */ |
||
161 | public static function should_use_short_path_names() { |
||
165 | |||
166 | |||
167 | } |
||
168 |