Set address

@param \Geocoder\Model\Address $address
@return Geo
549987
private function setAddress($address) {

        if(!$this->formatter) {
            $this->formatter = new StringFormatter();
        }

        $this->address = trim($this->formatter->format($address, '%S %n %z %L %C'));

        return $this;
    }
655133
public function setFrom($address, $name = null)
	{
		$this->getComposer()->from = new ezcMailAddress($address, $name, CHARSET);

		return $this;
	}
535488
public function sender($address, $name = null)
    {
        if (is_array($address)) {
            $this->addAddressArray($address, 'sender');
        } else {
            $this->sender[$address] = $name;
        }

        return $this;
    }
447
public function setAddress($value)
    {
        if (is_array($value)) {
            $value = new Address($value);
        }
        return $this->setParameter('address', $value);
    }
632926
public function setAddressType($addressType)
    {
        if (!in_array($addressType,
            array(
                AF_INET,
                AF_INET6,
                AF_UNIX
            )
        )) {
            throw new \DomainException('Unsupported address type');
        }

        $this->addressType = $addressType;
        return $this;
    }
1119239
public function addIp(string $address): CollectionInterface
    {
        $this->collection->addIp($address);

        $this->clearCache();

        return $this;
    }
428242
public function from($address, $name = null)
    {
        $this->message->setFrom($address, $name);

        return $this;
    }
250882
private function setAddress($quoteAddress, $address)
    {
        $address = $this->cartHelper->handleSpecialAddressCases($address);

        $region = $this->regionModel->loadByName(@$address->region, @$address->country_code);

        $addressData = [
            'firstname'    => @$address->first_name,
            'lastname'     => @$address->last_name,
            'street'       => trim(@$address->street_address1 . "\n" . @$address->street_address2),
            'city'         => @$address->locality,
            'country_id'   => @$address->country_code,
            'region'       => @$address->region,
            'postcode'     => @$address->postal_code,
            'telephone'    => @$address->phone_number,
            'region_id'    => $region ? $region->getId() : null,
            'company'      => @$address->company,
        ];

        if ($this->cartHelper->validateEmail(@$address->email_address)) {
            $addressData['email'] = $address->email_address;
        }

        // discard empty address fields
        foreach ($addressData as $key => $value) {
            if (empty($value)) {
                unset($addressData[$key]);
            }
        }

        $quoteAddress->setShouldIgnoreValidation(true);
        $quoteAddress->addData($addressData)->save();
    }
838973
protected function setAddress(Address $address, $addressKey)
    {
        if (!$address->id) {
            $addressResource = $this->client
                ->addresses()
                ->create($address->asArray());

            if ($addressResource) {
                $address = $addressResource;
            }
        }

        $this->updateParams["{$addressKey}Id"] = $address->id;
    }
66098
public function addressToPoint($address, $region = '')
    {
        // Get the URL for the Google API (and check for legacy config)
        $url = Config::inst()->get(__CLASS__, 'google_api_url')
            ?? Config::inst()->get('Symbiote\\Addressable\\GeocodeService', 'google_api_url');
        $key = Config::inst()->get(__CLASS__, 'google_api_key')
            ?? Config::inst()->get('Symbiote\\Addressable\\GeocodeService', 'google_api_key');

        if (!$url) {
            // If no URL configured. Stop.
            throw new GeocodeServiceException('No google_api_url configured. This is not allowed.');
        }

        // Add params
        $queryVars = [
            'address' => $address,
            'sensor'  => 'false',
        ];
        if ($region) {
            $queryVars['region'] = $region;
        }
        if ($key) {
            $queryVars['key'] = $key;
        }
        $url .= '?'.http_build_query($queryVars);

        $client = new Client();
        $response = $client->get($url);
        if (!$response) {
            throw new GeocodeServiceException('No response.', 0, '');
        }
        $statusCode = $response->getStatusCode();
        if ($statusCode !== 200) {
            throw new GeocodeServiceException('Unexpected status code:'.$statusCode, $statusCode, '');
        }
        $responseBody = (string)$response->getBody();
        $xml = new SimpleXMLElement($responseBody);
        if (!isset($xml->result)) {
            // Error handling
            if (isset($xml->status)) {
                $status = (string)$xml->status;
                if ($status === self::ERROR_ZERO_RESULTS) {
                    throw new GeocodeServiceException('Zero results returned. Invalid status from response: '.$status, $statusCode, $responseBody);
                } else {
                    throw new GeocodeServiceException('Unhandled status from response: '.$status, $statusCode, $responseBody);
                }
            }
            // Fallback to full string dump
            $text = trim($response->getBody());
            throw new GeocodeServiceException('Invalid response: '.$text, $responseBody);
        }
        $location = $xml->result->geometry->location;
        return [
            'lat' => (float)$location->lat,
            'lng' => (float)$location->lng
        ];
    }
249448
public function checkAddress($address)
    {
        $addr = $this->decodeBase58($address);
        if (strlen($addr) != 50) {
            return false;
        }
        $check = substr($addr, 0, strlen($addr) - 8);
        $check = pack('H*', $check);
        $check = strtoupper(hash('sha256', hash('sha256', $check, true)));
        $check = substr($check, 0, 8);

        return $check == substr($addr, strlen($addr) - 8);
    }
1228264
public function setSender($address, $name = null)
    {
        if (!is_array($address) && isset($name)) {
            $address = [$address => $name];
        }

        if (!$this->setHeaderFieldModel('Sender', (array) $address)) {
            $this->getHeaders()->addMailboxHeader('Sender', (array) $address);
        }

        return $this;
    }
275658
public function setAddressDestination(\Core\Entity\Address $address_destination = null) {
        $this->address_destination = $address_destination;

        return $this;
    }
895291
public function setAddressAddOn($addressAddOn): Hybrid
    {
        self::validateSetLength('addressAddOn', $addressAddOn);
        $this->data['addressAddOn'] = $addressAddOn;

        return $this;
    }
1125905
public function setReturnPath($address)
    {
        if (!$this->setHeaderFieldModel('Return-Path', $address)) {
            $this->getHeaders()->addPathHeader('Return-Path', $address);
        }

        return $this;
    }
806863
public function bcc($address, $name = null)
    {
        if (is_array($address)) {
            $this->addAddressArray($address, 'bcc');
        } else {
            $this->bcc[$address] = $name;
        }

        return $this;
    }
1280050
public function cleanCustomerAddress(array $address) {
    if (isset($address['customer_address_id']) && empty($address['address_id'])) {
      $address['address_id'] = $address['customer_address_id'];
    }

    return $this->cleanAddress($address);
  }