src/UserAgent.php
private static function loadUserAgents($filterBy = [])
    {
        $filterBy = self::validateFilter($filterBy);

        $agentDetails = self::getAgentDetails();
        $agentStrings = [];

        for ($i = 0; $i < count($agentDetails); $i++) {
            foreach ($filterBy as $key => $value) {
                if (!isset($agentDetails[$i][$key]) || !self::inFilter($agentDetails[$i][$key], $value)) {
                    continue 2;
                }
            }
            $agentStrings[] = $agentDetails[$i]['agent_string'];
        }

        return array_values($agentStrings);
    }
private static function loadUserAgents($filterBy = [])
    {
        $filterBy = self::validateFilter($filterBy);

        $agentDetails = self::getAgentDetails();
        $agentStrings = [];

        for ($i = 0; $i < count($agentDetails); $i++) {
            foreach ($filterBy as $key => $value) {
                if (!isset($agentDetails[$i][$key]) || !self::inFilter($agentDetails[$i][$key], $value)) {
                    continue 2;
                }
            }
            $agentStrings[] = $agentDetails[$i]['agent_string'];
        }

        return array_values($agentStrings);
    }
private static function loadUserAgents ( $ filterBy = [ ] ) { $ filterBy = self :: validateFilter ( $ filterBy ) ; $ agentDetails = self :: getAgentDetails ( ) ; $ agentStrings = [ ] ; for ( $ i = 0 ; $ i < count ( $ agentDetails ) ; $ i ++ ) { foreach ( $ filterBy as $ key => $ value ) { if ( ! isset ( $ agentDetails [ $ i ] [ $ key ] ) || ! self :: inFilter ( $ agentDetails [ $ i ] [ $ key ] , $ value ) ) { continue 2 ; } } $ agentStrings [ ] = $ agentDetails [ $ i ] [ 'agent_string' ] ; } return array_values ( $ agentStrings ) ; }
Returns an array of user agents that match a filter if one is provided

@param array $filterBy
@return array
Returns an array of user agents that match a filter if one is provided