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:----HG7LhVFZoKVUrWBQgyRWm8Z4+4e2vMi5f77fdsdpv+iKyZf8pV57WZPt/okVsskNcru31s8CGBlTwdM+LdbjlNUz/Zk5aK7ShuC3ymD3Zxb3c+UcKs8WGsav77lbkOwfM6ukL4LT7hzwGTtZGgC0/8u//PDiCssi8gMtJ6npec2HSf6W4vhlJ0/F1dEZ9VDsmB5tsrGLPhXdzqhpyeSHvHFW0zEFBpfooPx7Pi1B6J4+IWbbDKB36sD0fDuqvvnSkeRYIiW/JQvrN6g5w6O4RiYJvT2gdpbY+O7PB/CouuYgdY1/wdk+cWPrxrn4c/Cot0AX6VszcjlH/dkR+Ws2cTIgFbh3h1s505HWdW8O8RSs9WJ/+jBxEGDlLy1mRASSLE+TmUJ7YUkC65X79OmLnJyub1Dgej20p6qu9nhGFVfi42is/8MKX5OXkNAAS+5QJfmu8n20ElMckzk3UtN6g36XXdy39Tei6QE6AMVskeeO3XpOcf6T5UdJIyNrNPO/+QZi+gx5tytkCiPqkjEbfgRVSYnoMTrJ0Ify5My//8SnHhtmVS5yHXMVJ4Ns/TTXtk7rMQekrLnxTniUrfHytLbmAzFcsVbgwoCbpMbxnRcmLZPZNkQ9pbggIkGJIV7A9/fHpVl8zyk6uw4zekJjMxOfU12BO3nD9tA9NRc4OFs=----ATTACHMENT:----NDg5ODA2MzgyMDI3NDM4MCAxNzkyMjM0OTQyNzk3MTEgMjYwNjUwNTkwMjM3NDIxNw==