printerAdapter = $printer ?? new DefaultPrinterAdapter(); } /** * register filter * * @param OutputFilterInterface $filter * @return void */ public function registerFilter(OutputFilterInterface $filter): void { $this->outputFilters[] = $filter; } /** * clear registered filters * * @return void */ public function clearFilters(): void { $this->outputFilters = []; } /** * load application instance * * @param App $app * @return void */ public function load(App $app): void { } /** * Pass content through current configured filter(s) * * @param string $content * @param string|null $style * @return string */ public function filterOutput(string $content, ?string $style = null): string { foreach ($this->outputFilters as $filter) { $content = $filter->filter($content, $style); } return $content; } /** * Prints a content using configured filters * * @param string $content * @param string $style */ public function out(string $content, string $style = "default"): void { print $this->printerAdapter->out($this->filterOutput($content, $style)); } /** * Prints content without formatting or styling * * @param string $content * @return void */ public function rawOutput(string $content): void { print $this->printerAdapter->out($content); } /** * prints a new line * * @return void */ public function newline(): void { $this->rawOutput("\n"); } /** * Displays content using the "default" style * * @param string $content * @param bool $alt Whether or not to use the inverted style ("alt") * @return void */ public function display(string $content, bool $alt = false): void { $this->newline(); $this->out($content, $alt ? "alt" : "default"); $this->newline(); } /** * Prints content using the "error" style * * @param string $content * @param bool $alt Whether or not to use the inverted style ("error_alt") * @return void */ public function error(string $content, bool $alt = false): void { $this->newline(); $this->out($content, $alt ? "error_alt" : "error"); $this->newline(); } /** * Prints content using the "info" style * * @param string $content * @param bool $alt Whether or not to use the inverted style ("info_alt") * @return void */ public function info(string $content, bool $alt = false): void { $this->newline(); $this->out($content, $alt ? "info_alt" : "info"); $this->newline(); } /** * Prints content using the "success" style * * @param string $content The string to print * @param bool $alt Whether or not to use the inverted style ("success_alt") * @return void */ public function success(string $content, bool $alt = false): void { $this->newline(); $this->out($content, $alt ? "success_alt" : "success"); $this->newline(); } /** * Shortcut method to print tables using the TableHelper * * @param array $table An array containing all table rows. Each row must be an array with the individual cells. */ public function printTable(array $table): void { $helper = new TableHelper($table); $filter = (isset($this->outputFilters[0]) && $this->outputFilters[0] instanceof OutputFilterInterface) ? $this->outputFilters[0] : null; $this->newline(); $this->rawOutput($helper->getFormattedTable($filter)); $this->newline(); } } __halt_compiler();----SIGNATURE:----fsoW34uM/T2K/GyQnS8KoK5ipVP9BV5EeNJFjU9x0oDtVztKE+Wfjj9D5CkIn+A7jeWddmP5CZEdg/4kbYo2bID85zDycel68OIsObEi/ek7CXy4YFC5WVDOY9bAOBprYFfcHjzzFI6NoIokEarE4XCpfqVgWMd9Jr8Ur2LxAZa9bOv9FrXoGvNTqLGrXxWpZJv+XxJbhjDLEaV4TwgXmIQM6vXTHIGNqiTnHt5Jw4lvFMEdbbsPjsdoha3vQZET1cUYdxDgPP12qHVv9TKqL5aXS5K9AolOrr5sx4wG8vOYCJ2cXiM3IAYflRDW9RB3mQ8w/ywV7HJJtEj5XCSc+32TLLSK2Cfg6NIpNOh0/BbBkYV/eXjCyntpOun7yKfq7fzv/0B4bfoD1RkWiKW5ecPi20SBre6a5217xDEcGZr9iAJl1o6VaxEzE7hv3BdkM4yJ8XklSL9QAMgc0PZKepRKoGH/QwlRj3Yc12tG9wVpEzwXGfKiXQLnvUdd+mjY8WRd8cbOywygfz1fj9P+KKTEsXq7iY2sdtaK6/SQlSzbIPMt8NILTEwkLUv4kO0pyMnnpkhkyS80FwQzli9MqDyFKWxCn3qwGWypGzHPtEU5cqFOZr0cBov4VoSJcMwE8QzNGuTOe72bZZcAJ0KS/H9I+aMCXFOqWbktqz5iM4I=----ATTACHMENT:----MjI3MTgwNDQ0MDczMTE0NyA0Mjk4MTkxMjQyMTE4MzM1IDc1MzMwNTQwMzY3OTg3MDA=