src/Factory.php
public static function getParsers()
    {
        $parsers = [];
        $parserClassList = ClassMapGenerator::createMap(base_path().'/vendor/abuseio');
        /** @noinspection PhpUnusedParameterInspection */
        $parserClassListFiltered = array_where(
            array_keys($parserClassList),
            function ($value, $key) {
                // Get all parsers, ignore all other packages.
                if (strpos($value, 'AbuseIO\Parsers\\') !== false) {
                    return $value;
                }
                return false;
            }
        );

        $parserList = array_map('class_basename', $parserClassListFiltered);
        foreach ($parserList as $parser) {
            if (!in_array($parser, ['Factory', 'Parser'])) {
                $parsers[] = $parser;
            }
        }
        return $parsers;
    }
public static function getParsers()
    {
        $parsers = [];
        $parserClassList = ClassMapGenerator::createMap(base_path().'/vendor/abuseio');
        /** @noinspection PhpUnusedParameterInspection */
        $parserClassListFiltered = array_where(
            array_keys($parserClassList),
            function ($value, $key) {
                // Get all parsers, ignore all other packages.
                if (strpos($value, 'AbuseIO\Parsers\\') !== false) {
                    return $value;
                }
                return false;
            }
        );

        $parserList = array_map('class_basename', $parserClassListFiltered);
        foreach ($parserList as $parser) {
            if (!in_array($parser, ['Factory', 'Parser'])) {
                $parsers[] = $parser;
            }
        }
        return $parsers;
    }
public static function getParsers ( ) { $ parsers = [ ] ; $ parserClassList = ClassMapGenerator :: createMap ( base_path ( ) . '/vendor/abuseio' ) ; /** @noinspection PhpUnusedParameterInspection */ $ parserClassListFiltered = array_where ( array_keys ( $ parserClassList ) , function ( $ value , $ key ) { // Get all parsers, ignore all other packages. if ( strpos ( $ value , 'AbuseIO\Parsers\\' ) !== false ) { return $ value ; } return false ; } ) ; $ parserList = array_map ( 'class_basename' , $ parserClassListFiltered ) ; foreach ( $ parserList as $ parser ) { if ( ! in_array ( $ parser , [ 'Factory' , 'Parser' ] ) ) { $ parsers [ ] = $ parser ; } } return $ parsers ; }
Get a list of installed AbuseIO parsers and return as an array
@return array
Get a list of installed AbuseIO parsers and return as an array