theme = $theme ?? new DefaultTheme(); } /** * Gets the CLITheme * * @return CLIThemeInterface */ public function getTheme(): CLIThemeInterface { return $this->theme; } /** * Sets the CLITheme * * @param CLIThemeInterface $theme * @return void */ public function setTheme(CLIThemeInterface $theme): void { $this->theme = $theme; } /** * Filters a string according to the specified style. * * @param string $message * @param string|null $style * @return string the resulting string */ public function filter(string $message, ?string $style = "default"): string { return $this->format($message, $style); } /** * Formats a message with color codes based on a CLITheme * * @param string $message * @param string $style * @return string */ public function format(string $message, string $style = "default"): string { $styleColors = $this->theme->getStyle($style); $bg = ''; if (isset($styleColors[1])) { $bg = ';' . $styleColors[1]; } return sprintf("\e[%s%sm%s\e[0m", $styleColors[0], $bg, $message); } } __halt_compiler();----SIGNATURE:----kRABcOSKLjApyxkNfLzR40J5sLSqqBb8Xw7+PXifvoz0x7PPaIDEuPO/ljqNhBubE2p+TjP/CmcRpbB/s3l9vVzjnP2GSN7BW92zaSmtCYGmkb01leKUZe5uMz9U9ql4D1mUrsJEDP9vBuv5kBX5Tkoho8GiXCYOUTwRVYsjl0D5Z0lMhfNo4pYpAuIM/x3fkwc4Zasad2r+iljqTAlnl57kDylCjsDWaCQZZj1sjrKv+kTUbvp63Y6V6eYHCb0qh2y0k/MjXt4HY97/g4B8mRfFviRl8NNnqoFCN6pxxnPGegjzrMzyTyKcQrVjNJiHXEJqOLJ5wKEGlLwygg43bJR079YGmCQX0qdcdS1BtmNHM4gIbEuV6Ol/g8PdDdvVemKIIKQOt2PpFUFgERDrp5at78SaGVDQ7PpXvp7dBN2v3SAa7owb1H7xfJS4T4CYIn4/AVi9GgKOffvvzod8q6JmOg8N/KqcuXtiznRzpuT8KjazX40InNU76qa3wj1rRfwvaLeQ3GBhpDuGiirhsNYmk66OepKJ1S1aEhTYELjb4hIJvD0v1rpESoq6/he5/mHT2LqK99/DAUPwjsK3JWaofPo+Ec/1pR+ky7LHxWCiyqEI5MRMdZwo5GRO8KDY4VCwpNTgRLSRIrb5eKbfkYZR+7ACQzDCkjm/DTkADMs=----ATTACHMENT:----NDE0NjM4ODQ2NTAyNzY4MCA4NTg4MTk4NDMzMjY2NzkyIDU0MDk4MDA1NDQyMzYwMTk=