Sets the address city

@since 1.0.0
@param string A string containing the cityname
@return \Icepay_Order_Address
@throws Exception when empty
167256
public function setCity($city) {
        if (empty($city))
            throw new Exception('City must be set and cannot be empty.');

        $this->city = trim($city);

        return $this;
    }
1132675
public function getCoordinates(
        ?string $street = null,
        ?string $streetNumber = null,
        ?string $city = null,
        ?string $zip = null,
        ?string $country = null
    ): Coordinates {
        $items = [];
        $variables = [$street, $streetNumber, $city, $zip, $country];
        foreach ($variables as $variable) {
            if (empty($variable)) {
                continue;
            }

            $items[] = $variable;
        }

        $results = $this->doCall(array(
            'address' => implode(' ', $items),
            'sensor' => 'false'
        ));

        if (!array_key_exists(0, $results)) {
            throw Exception::noCoordinatesFoundforAddress($variables);
        }

        return new Coordinates(
            $results[0]->geometry->location->lat,
            $results[0]->geometry->location->lng
        );
    }
772149
public function setFrom($address, $name = '', $auto = true)
    {
        $address = trim($address);
        $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
        // Don't validate now addresses with IDN. Will be done in send().
        $pos = strrpos($address, '@');
        if (false === $pos or
            (!$this->has8bitChars(substr($address, ++$pos)) or !static::idnSupported()) and
            !static::validateAddress($address)) {
            $error_message = sprintf('%s (From): %s',
                $this->lang('invalid_address'),
                $address);
            $this->setError($error_message);
            $this->edebug($error_message);
            if ($this->exceptions) {
                throw new Exception($error_message);
            }

            return false;
        }
        $this->From = $address;
        $this->FromName = $name;
        if ($auto) {
            if (empty($this->Sender)) {
                $this->Sender = $address;
            }
        }

        return true;
    }
134408
public function setServerAddress($serverAddress)
    {
        $serverAddress = (string) $serverAddress;
        if ($serverAddress === '') {
            throw new \InvalidArgumentException('$serverAddress cannot be empty');
        }

        $this->serverAddress = $serverAddress;
    }
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);
    }
784919
@Override
  public String requestDepositAddress(Currency currency, String... arguments) throws IOException {
    if (currency.equals(Currency.BTC)) {
      return getBitstampBitcoinDepositAddress().getDepositAddress();
    } else if (currency.equals(Currency.LTC)) {
      return getBitstampLitecoinDepositAddress().getDepositAddress();
    } else if (currency.equals(Currency.XRP)) {
      return getRippleDepositAddress().getAddressAndDt();
    } else if (currency.equals(Currency.BCH)) {
      return getBitstampBitcoinCashDepositAddress().getDepositAddress();
    } else if (currency.equals(Currency.ETH)) {
      return getBitstampEthereumDepositAddress().getDepositAddress();
    } else {
      throw new IllegalStateException("Unsupported currency " + currency);
    }
  }
1316307
private void setAddress(Address address, RolodexContract rolodex) {
        if (rolodex != null) {
            address.setStreet1(rolodex.getAddressLine1());
            address.setStreet2(rolodex.getAddressLine2());
            address.setCity(checkNull(rolodex.getCity()));
            address.setCounty(rolodex.getCounty());
            address.setState(rolodex.getState());
            address.setZipCode(rolodex.getPostalCode());
            if (rolodex.getCountryCode() != null) {
                CountryCodeType.Enum country = CountryCodeType.Enum.forString(rolodex.getCountryCode());
                address.setCountry(country);
            }
        }else {
            address.setStreet1("");
            address.setCity("");
        }
    }
32709
@Override
  public String requestDepositAddress(Currency currency, String... arguments) throws IOException {
    try {
      CoingiDepositWalletRequest request =
          new CoingiDepositWalletRequest().setCurrency(currency.getCurrencyCode().toUpperCase());
      return depositWallet(request).getAddress();
    } catch (CoingiException e) {
      throw CoingiErrorAdapter.adapt(e);
    }
  }
806118
public function setAddress($address)
    {
        if (is_object($address)) {
            $this->address = $address;
        } elseif (is_string($address) || is_array($address)) {
            $this->address = new Address($address);
        }
    }
528733
public function setAddress($address)
    {
        if (null === $address) {
            $this->address = null;
        } elseif ('' == $address) {
            $this->address = '';
        } else {
            $this->assertValidAddress($address);
            $this->address = $address;
        }
        $this->setCachedValue(null);
    }
133410
public static void validateAddress(String address) throws ServiceException {
        if (address == null || address.isEmpty()) {
            throw new ServiceException(
                    ErrorCode.SERVICE_INSTANCE_ADDRESS_FORMAT_ERROR);
        }
    }
1032198
public function SetFrom($address, $name = '')
    {
        $address = trim($address);
        $name    = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
        if (!self::ValidateAddress($address)) {
            $this->SetError($this->Lang('invalid_address') . ': ' . $address);
            if ($this->exceptions) {
                throw new phpmailerException($this->Lang('invalid_address') . ': ' . $address);
            }
            echo $this->Lang('invalid_address') . ': ' . $address;
            return false;
        }
        $this->From     = $address;
        $this->FromName = $name;
        return true;
    }
650848
public function setOrder($order)
    {

        if (($order > 5)) {
            throw new \InvalidArgumentException('invalid value for $order when calling GetCharactersCharacterIdPlanetsPlanetIdWaypoint., must be smaller than or equal to 5.');
        }
        if (($order < 1)) {
            throw new \InvalidArgumentException('invalid value for $order when calling GetCharactersCharacterIdPlanetsPlanetIdWaypoint., must be bigger than or equal to 1.');
        }

        $this->container['order'] = $order;

        return $this;
    }
504629
public function setCity($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->city !== $v) {
            $this->city = $v;
            $this->modifiedColumns[DealerVersionTableMap::CITY] = true;
        }


        return $this;
    }
1210529
public function fromArray(array $data = [])
    {
        if (isset($data['providerName'])) {
            $this->providerName = $data['providerName'];
        }
        if (isset($data['query'])) {
            $this->query = $data['query'];
        }
        if (isset($data['exception'])) {
            $this->exception = $data['exception'];
        }

        //GeoCoder Address::createFromArray expects longitude/latitude keys
        $data['address']['longitude'] = $data['address']['coordinates']['longitude'] ?? null;
        $data['address']['latitude'] = $data['address']['coordinates']['latitude'] ?? null;

        // Shortcut to create the address and set it in this class
        $this->setAddress(Address::createFromArray($data['address']));
    }
272007
public function setAddress1($address1)
	{
		if ( $address1 == $this->getAddress1() ) { return; }

		$this->_values['address1'] = (string) $address1;
		$this->setModified();
	}
415543
public function setCity($city)
    {
        if (!empty($city) && ctype_print($city)) {
            $this->city = trim($city);
        }

        return $this;
    }