@param Address|array $value

@return $this
356180
public function setPrimaryAddress($value)
    {
        // TODO: Remove after deprecated setEmail(), setFirstName(), setLastName() methods removed
        if (is_array($value)) {
            $value = Address::createFromData($value);
        }

        if (empty($value->getEmails()) && $this->getAttribute('email') !== null) {
            $email = Email::createFromData([
                'label' => 'main',
                'value' => $this->getAttribute('email'),
                'primary' => true,
            ]);

            $value->setEmails([$email]);
        }

        if (empty($value->getFirstName()) && $this->getAttribute('firstName') !== null) {
            $value->setFirstName($this->getAttribute('firstName'));
        }

        if (empty($value->getLastName()) && $this->getAttribute('lastName') !== null) {
            $value->setLastName($this->getAttribute('lastName'));
        }

        return $this->setAttribute('primaryAddress', $value);
    }
632072
protected function set(array $value) {
        return $this->cache->set('yasmin-ratelimiter-'.$this->endpoint, $value)->then(null, function (\Throwable $e) {
            if($e->getMessage() !== 'Client got destroyed') {
                throw $e;
            }
        });
    }
628685
public function set($name, $value = null): self
    {
        if (!is_array($name)) {
            $name = [$name => $value];
        }

        foreach ($name as $property => $value) {
            $this->_data[$property] = $value;
        }

        return $this;
    }
85771
public function setCorePhpthumbNooffsitelinkRequireRefer($value)
    {
        $this->setFieldName('phpthumb_nooffsitelink_require_refer');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
567123
public function removeDealerContentId($value)
    {
        $targetArray = array();
        foreach ($this->getDealerContentIds() as $element) {
            if ($element != $value) {
                $targetArray []= $element;
            }
        }
        $this->setDealerContentIds($targetArray);

        return $this;
    }
1255901
public function setFulfillmentChannel($value)
    {
        if (!$this->_isNumericArray($value)) {
            $value = array ($value);
        }
        $this->_fields['FulfillmentChannel']['FieldValue'] = $value;
        return $this;
    }
1129994
public function setItems(array $value) {
    if (isset($value[0]) &&
        is_object($value[0]) &&
        !$value[0] instanceof GalleryItem
    ) {
      $this->triggerError('Object not of type GalleryItem');
    }
    else {
      $this->items = $value;
    }
    return $this;
  }
432040
public function setWebsites(array $value)
    {
        $websites = [];

        foreach ($value as $website) {
            if ($website instanceof Website) {
                $websites[] = $website->getId();
            } elseif (is_string($website)) {
                $websites[] = $website;
            } else {
                throw new DomainException('Each website must be string identifier or Website entity object');
            }
        }

        return $this->setAttribute('websites', $websites);
    }
321499
public function setCoreEmailsubject($value)
    {
        $this->setFieldName('emailsubject');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
1287355
public function setData(
        array $value)
    {
        $this->_cache = $value;

        $newObjectData = [];
        foreach ($this->_cache as $k => $v) {
            $newObjectData[$k] = is_object($v) && $v instanceof LazyJsonMapper
                               ? $v->asArray() // Throws.
                               : $v; // Is already a valid value.
        }

        $this->assignObjectData($newObjectData); // Throws.

        return $this;
    }
30320
public function setSmsParam($value)
    {
        if (is_array($value)) {
            $value = Support::jsonStr($value);
        }

        $this->params['sms_param'] = $value;

        return $this;
    }
602243
public function append($value)
    {
        $nValue = (is_array($value) ? $value : [$value]);
        return $this->vUnion(new static($nValue));
    }
96554
function setHelpers(array $value): self {
    if ($this->engine) $this->engine->setHelpers($value);
    else $this->helpers = $value;
    return $this;
  }
1296729
public function setHeader($name, $value)
    {
        if (isset($this->headers[$name])) {
            if (is_array($this->headers[$name])) {
                $this->headers[$name] = (array)$value;
            } else {
                $this->headers[$name] = $value;
            }
        } else {
            $this->headers[$name] = (array)$value;
        }

        return $this;
    }
472955
public function forgetValue($value)
    {
        $key = array_search($value, $this->values);

        if ($key !== false) {
            unset($this->values[$key]);
        }

        return $this;
    }
311877
public function setTagFilters(array $value = null)
    {
        if ($value === null) {
            $this->tagFilters = ['none'];
        } elseif (empty($value)) {
            $this->tagFilters = ['all'];
        } else {
            $this->tagFilters = $value;
        }

        return $this;
    }
1120240
public function setOrders($value)
    {
        if (!$this->_isNumericArray($value)) {
            $value = array ($value);
        }
        $this->_fields['Orders']['FieldValue'] = $value;
        return $this;
    }