original_string: protected function get_blacklisted_hosts_by_category() {
          // For each of the admin setting entries, check and place in the correct section of the config array.
          $config = ['ipv6' => [], 'ipv4' => [], 'domain' => [], 'domainwildcard' => []];
          $entries = $this->get_blacklisted_hosts();
          foreach ($entries as $entry) {
              if (ip_utils::is_ipv6_address($entry) || ip_utils::is_ipv6_range($entry)) {
                  $config['ipv6'][] = $entry;
              } else if (ip_utils::is_ipv4_address($entry) || ip_utils::is_ipv4_range($entry)) {
                  $config['ipv4'][] = $entry;
              } else if (ip_utils::is_domain_name($entry)) {
                  $config['domain'][] = $entry;
              } else if (ip_utils::is_domain_matching_pattern($entry)) {
                  $config['domainwildcard'][] = $entry;
              }
          }
          return $config;
      }
code: protected function get_blacklisted_hosts_by_category() {
          // For each of the admin setting entries, check and place in the correct section of the config array.
          $config = ['ipv6' => [], 'ipv4' => [], 'domain' => [], 'domainwildcard' => []];
          $entries = $this->get_blacklisted_hosts();
          foreach ($entries as $entry) {
              if (ip_utils::is_ipv6_address($entry) || ip_utils::is_ipv6_range($entry)) {
                  $config['ipv6'][] = $entry;
              } else if (ip_utils::is_ipv4_address($entry) || ip_utils::is_ipv4_range($entry)) {
                  $config['ipv4'][] = $entry;
              } else if (ip_utils::is_domain_name($entry)) {
                  $config['domain'][] = $entry;
              } else if (ip_utils::is_domain_matching_pattern($entry)) {
                  $config['domainwildcard'][] = $entry;
              }
          }
          return $config;
      }
code_tokens: protected function get_blacklisted_hosts_by_category ( ) { // For each of the admin setting entries, check and place in the correct section of the config array. $ config = [ 'ipv6' => [ ] , 'ipv4' => [ ] , 'domain' => [ ] , 'domainwildcard' => [ ] ] ; $ entries = $ this -> get_blacklisted_hosts ( ) ; foreach ( $ entries as $ entry ) { if ( ip_utils :: is_ipv6_address ( $ entry ) || ip_utils :: is_ipv6_range ( $ entry ) ) { $ config [ 'ipv6' ] [ ] = $ entry ; } else if ( ip_utils :: is_ipv4_address ( $ entry ) || ip_utils :: is_ipv4_range ( $ entry ) ) { $ config [ 'ipv4' ] [ ] = $ entry ; } else if ( ip_utils :: is_domain_name ( $ entry ) ) { $ config [ 'domain' ] [ ] = $ entry ; } else if ( ip_utils :: is_domain_matching_pattern ( $ entry ) ) { $ config [ 'domainwildcard' ] [ ] = $ entry ; } } return $ config ; }
docstring: Helper to get all entries from the admin setting, as an array, sorted by classification.
  Classifications include 'ipv4', 'ipv6', 'domain', 'domainwildcard'.
  
  @return array of host/domain/ip entries from the 'curlsecurityblockedhosts' config.
docstring_tokens: Helper to get all entries from the admin setting as an array sorted by classification . Classifications include ipv4 ipv6 domain domainwildcard .