code: public function addParser($name, $class, $before = null)
      {
          if ($before === null) {
              $this->parsers[$name] = $class;
              return $this;
          }
  
          if (($offset = array_search($before, array_keys($this->parsers))) !== false) {
              $this->parsers = array_slice($this->parsers, 0, $offset, true)
                  + array($name => $class)
                  + array_slice($this->parsers, $offset, null, true);
  
              return $this;
          }
  
          throw new \RuntimeException(sprintf('Parser "%s" does not exist.', $before));
      }
docs: Add a parser type to the list of parsers
  
  Some parsers can conflict with each other so order is important. Use
  the $before parameter in insert a parser in a specific place.
  
  @param string $name Name of the parser
  @param mixed $class Classname of the parser
  @param mixed $before Insert the new parser before this parser
  @return $this
  @throws \RuntimeException if the $before parser does not exist