public static function countries($longlist = false, $hydrate = false)
    {
        $list = $longlist ? 'longlist' : 'shortlist';

        if (! isset(static::$countries[$list])) {
            static::$countries[$list] = json_decode(static::getFile(__DIR__.'/../resources/data/'.$list.'.json'), true);
        }

        return $hydrate ? array_map(function ($country) {
            return new Country($country);
        }, static::$countries[$list]) : static::$countries[$list];
    }
public static function countries($longlist = false, $hydrate = false)
    {
        $list = $longlist ? 'longlist' : 'shortlist';

        if (! isset(static::$countries[$list])) {
            static::$countries[$list] = json_decode(static::getFile(__DIR__.'/../resources/data/'.$list.'.json'), true);
        }

        return $hydrate ? array_map(function ($country) {
            return new Country($country);
        }, static::$countries[$list]) : static::$countries[$list];
    }
public static function countries ( $ longlist = false , $ hydrate = false ) { $ list = $ longlist ? 'longlist' : 'shortlist' ; if ( ! isset ( static :: $ countries [ $ list ] ) ) { static :: $ countries [ $ list ] = json_decode ( static :: getFile ( __DIR__ . '/../resources/data/' . $ list . '.json' ) , true ) ; } return $ hydrate ? array_map ( function ( $ country ) { return new Country ( $ country ) ; } , static :: $ countries [ $ list ] ) : static :: $ countries [ $ list ] ; }
Get all countries short-listed.

@param bool $longlist
@param bool $hydrate

@return array
Get all countries short - listed .