public static function fromMap()

in php/src/Models/SearchResponse.php [71:94]


    public static function fromMap($map = [])
    {
        $model = new self();
        if (isset($map['status'])) {
            $model->status = $map['status'];
        }
        if (isset($map['request_id'])) {
            $model->requestId = $map['request_id'];
        }
        if (isset($map['result'])) {
            $model->result = SearchResult::fromMap($map['result']);
        }
        if (isset($map['errors'])) {
            if (!empty($map['errors'])) {
                $model->errors = [];
                $n             = 0;
                foreach ($map['errors'] as $item) {
                    $model->errors[$n++] = null !== $item ? Error::fromMap($item) : $item;
                }
            }
        }

        return $model;
    }