*/ class OutputFormatterStyleStack implements ResetInterface { /** @var OutputFormatterStyleInterface[] */ private $styles; private $emptyStyle; public function __construct(OutputFormatterStyleInterface $emptyStyle = null) { $this->emptyStyle = $emptyStyle ?? new OutputFormatterStyle(); $this->reset(); } /** * Resets stack (ie. empty internal arrays). */ public function reset() { $this->styles = []; } /** * Pushes a style in the stack. */ public function push(OutputFormatterStyleInterface $style) { $this->styles[] = $style; } /** * Pops a style from the stack. * * @return OutputFormatterStyleInterface * * @throws InvalidArgumentException When style tags incorrectly nested */ public function pop(OutputFormatterStyleInterface $style = null) { if (empty($this->styles)) { return $this->emptyStyle; } if (null === $style) { return array_pop($this->styles); } foreach (array_reverse($this->styles, true) as $index => $stackedStyle) { if ($style->apply('') === $stackedStyle->apply('')) { $this->styles = \array_slice($this->styles, 0, $index); return $stackedStyle; } } throw new InvalidArgumentException('Incorrectly nested style tag found.'); } /** * Computes current style with stacks top codes. * * @return OutputFormatterStyle */ public function getCurrent() { if (empty($this->styles)) { return $this->emptyStyle; } return $this->styles[\count($this->styles) - 1]; } /** * @return $this */ public function setEmptyStyle(OutputFormatterStyleInterface $emptyStyle) { $this->emptyStyle = $emptyStyle; return $this; } /** * @return OutputFormatterStyleInterface */ public function getEmptyStyle() { return $this->emptyStyle; } } __halt_compiler();----SIGNATURE:----eFeeqwKppnNdC4yzrnrmbXNIvb9Un0TOVk8jVnaCafo88TCgGu4X37tPX1TSBmWc+l+uyF3Aps45n39rUQR5jxAJSPX0InmQUsTrOUm8cIY9W+xDvxEFg17Q/Ff+ta9WQAR3aA1J0G9E/2niyurC27NrX2wgUFq+nyM72X6SyHs/f5kTC/89k7KjJFhbVcP5hkji22su6+kLwPhop1mP2a4rstHa7ocW82XsiqVcfXuBl2jb6rrkWNyL3WbvwVx2bzzCPTedq54zcgVxoUXmdbVjldmiPtYBgnj07DXB0gp2IM9l0YkRwbyFlEJuqMrsJExefbOZNfV+n7qgbUkc2tUNWEh6HEEUHDsALIrg4uH0zckKZbWHftMKSJZwLSDPM7GHkCqWCyA6MINygi7/TQk15FjmROJt6CQ30VPxlFeNDS3pQCs3t5IQ7QMpOGPysbzpDEfsHjah1rZNz5biyb1XMVNvM/R6gYGtuuQxd6oEHZF5aMFKKnjCbh52g5+M+sFq5CXkinLTsCLCPZH0JWAEdxYBfrjmXGwQV/TZ5871nZTHtIsVnv20gLU/tsUCbUgYeASiiDiUuioZ9Or4BQA/Gh+eVCJF85bxcFAq9KJq6BsMQHD1PoZcP+0PmDeSvVEuw7oFD7Xz2j4dnL8HWD/XewtNzfTf5ysYK6+o4+A=----ATTACHMENT:----MzkyNDYxMjM5MjY2MDMxMCA0NjMyNzQ1NTE0ODk4NjkwIDQ4MTI4Njg1NjMxOTY5OQ==