Bitrix Site Manager

CSearcher::GetDomainList

CDBResult
CSearcher::GetDomainList(
 string &by = "s_id",
 string &order = "desc",
 array filter = array(),
 bool &is_filtered
)

The method GetDomainList returns a list of search engine domains.

Parameters

Parameter Description
by Sorting field; possible values:
  • s_id - the domain ID;
  • s_domain - domain;
  • s_variable - variable name (separate multiple names with comma), containing the search phrase.
order Sort order; the following values are possible:
  • asc - ascending;
  • desc - descending.
filter Array used to filter the resulting list. The following keys can be used in the array:
  • ID* - the domain ID;
  • ID_EXACT_MATCH - if "N", entry in the ID is sufficient (loose match);
  • SEARCHER_ID* - the search engine ID;
  • SEARCHER_ID_EXACT_MATCH - if "N", entry in the SEARCHER_ID is sufficient (loose match);
  • DOMAIN* - domain;
  • DOMAIN_EXACT_MATCH - if "Y", the DOMAIN must match exactly (strict match);
  • VARIABLE* - variable name (separate multiple names with comma), containing the search phrase;
  • VARIABLE_EXACT_MATCH - if "Y", the VARIABLE must match exactly (strict match).
* - complex logic allowed.
is_filtered If this flag contains "true" on return, the resulting list is filtered.

Structure of the returned record

Array
(
    [ID] => the domain ID
    [DOMAIN] => domain
    [VARIABLE] => variable name (separate multiple names
                  with comma), containing the search phrase
)

See Also

Example



<?
// select domains of the search engine #20
$arFilter = array(
    "SEARCHER_ID" => 20
    );

// obtain the list of records
$rs = CSearcher::GetDomainList(
    ($by = "s_id"), 
    ($order = "desc"), 
    $arFilter, 
    $is_filtered
    );

// print all records
while ($ar = $rs->Fetch())
{
    echo "<pre>"; print_r($ar); echo "</pre>";    
}
?>