in php/src/Models/SearchResult.php [107:139]
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['searchtime'])) {
$model->searchtime = $map['searchtime'];
}
if (isset($map['total'])) {
$model->total = $map['total'];
}
if (isset($map['viewtotal'])) {
$model->viewtotal = $map['viewtotal'];
}
if (isset($map['num'])) {
$model->num = $map['num'];
}
if (isset($map['items'])) {
if (!empty($map['items'])) {
$model->items = [];
$model->items = $map['items'];
}
}
if (isset($map['facet'])) {
if (!empty($map['facet'])) {
$model->facet = [];
$n = 0;
foreach ($map['facet'] as $item) {
$model->facet[$n++] = null !== $item ? SearchResultFacet::fromMap($item) : $item;
}
}
}
return $model;
}