public function getRegisteredParsers()
    {
        if ($this->parserInstances === null) {
            $result = [];
            foreach ($this->parsers as $parser) {
                if ($parser instanceof ParserInterface) {
                    $result[] = $parser;
                } else {
                    $instance = $this->app->make($parser);
                    if (!($instance instanceof ParserInterface)) {
                        throw new UserMessageException(t(/*i18n: %1$s is the name of a PHP class, %2$s is the name of a PHP interface*/'%1$s does not implement %2$s', $parser, ParserInterface::class));
                    }
                    $result[] = $instance;
                }
            }
            $this->parserInstances = $result;
        } else {
            $result = $this->parserInstances;
        }

        return $result;
    }
public function getRegisteredParsers()
    {
        if ($this->parserInstances === null) {
            $result = [];
            foreach ($this->parsers as $parser) {
                if ($parser instanceof ParserInterface) {
                    $result[] = $parser;
                } else {
                    $instance = $this->app->make($parser);
                    if (!($instance instanceof ParserInterface)) {
                        throw new UserMessageException(t(/*i18n: %1$s is the name of a PHP class, %2$s is the name of a PHP interface*/'%1$s does not implement %2$s', $parser, ParserInterface::class));
                    }
                    $result[] = $instance;
                }
            }
            $this->parserInstances = $result;
        } else {
            $result = $this->parserInstances;
        }

        return $result;
    }
public function getRegisteredParsers ( ) { if ( $ this -> parserInstances === null ) { $ result = [ ] ; foreach ( $ this -> parsers as $ parser ) { if ( $ parser instanceof ParserInterface ) { $ result [ ] = $ parser ; } else { $ instance = $ this -> app -> make ( $ parser ) ; if ( ! ( $ instance instanceof ParserInterface ) ) { throw new UserMessageException ( t ( /*i18n: %1$s is the name of a PHP class, %2$s is the name of a PHP interface*/ '%1$s does not implement %2$s' , $ parser , ParserInterface :: class ) ) ; } $ result [ ] = $ instance ; } } $ this -> parserInstances = $ result ; } else { $ result = $ this -> parserInstances ; } return $ result ; }
Get the list of registered parsers.

@throws UserMessageException

@return ParserInterface[]
Get the list of registered parsers .