public function popParser() { if (!$this->parsers) { throw new LogicException('You tried to pop from an empty parsers stack.'); } return array_shift($this->parsers); }