Declares an association between this object and a Country object.

@param                  Country $v
@return Customer The current object (for fluent API support)
@throws PropelException
519760
public function setCountry(Country $v = null)
    {
        if ($v === null) {
            $this->setCountryId(NULL);
        } else {
            $this->setCountryId($v->getId());
        }

        $this->aCountry = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the Country object, it will not be re-added.
        if ($v !== null) {
            $v->addCustomer($this);
        }


        return $this;
    }
1331466
public function setParent(\Haven\PersonaBundle\Entity\Country $parent = null)
    {
        $this->parent = $parent;
    
        return $this;
    }
853421
public function setCountry(ChildCountry $v = null)
    {
        if ($v === null) {
            $this->setCountryId(NULL);
        } else {
            $this->setCountryId($v->getId());
        }

        $this->aCountry = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildCountry object, it will not be re-added.
        if ($v !== null) {
            $v->addDealer($this);
        }


        return $this;
    }
380477
static function getVAT( $object, $country )
    {
        // Load VAT handler.
        if ( !is_object( $handler = eZVATManager::loadVATHandler() ) )
        {
            if ( $handler === true )
            {
                eZDebug::writeWarning( "No VAT handler specified but dynamic VAT charging is used." );
            }

            return null;
        }

        // Check if user country must be specified.
        $requireUserCountry = eZVATManager::isUserCountryRequired();

        // Determine user country if it's not specified
        if ( $country === false )
            $country = eZVATManager::getUserCountry();

        if ( !$country && $requireUserCountry )
        {
            eZDebug::writeNotice( "User country is not specified." );
        }

        return $handler->getVatPercent( $object, $country );
    }
780421
public function addCountry()
    {
        // Check current user authorization
        if (null !== $response = $this->checkAuth($this->resourceCode, array(), AccessManager::UPDATE)) {
            return $response;
        }

        $areaCountryForm = $this->createForm(AdminForm::AREA_COUNTRY);
        $error_msg = null;
        try {
            $form = $this->validateForm($areaCountryForm);

            $event = new AreaAddCountryEvent($form->get('area_id')->getData(), $form->get('country_id')->getData());

            $this->dispatch(TheliaEvents::AREA_ADD_COUNTRY, $event);

            if (! $this->eventContainsObject($event)) {
                throw new \LogicException(
                    $this->getTranslator()->trans("No %obj was updated.", array('%obj', $this->objectName))
                );
            }

            // Log object modification
            if (null !== $changedObject = $this->getObjectFromEvent($event)) {
                $this->adminLogAppend(
                    $this->resourceCode,
                    AccessManager::UPDATE,
                    sprintf(
                        "%s %s (ID %s) modified, new country added",
                        ucfirst($this->objectName),
                        $this->getObjectLabel($changedObject),
                        $this->getObjectId($changedObject)
                    ),
                    $this->getObjectId($changedObject)
                );
            }

            // Redirect to the success URL
            return $this->generateSuccessRedirect($areaCountryForm);
        } catch (FormValidationException $ex) {
            // Form cannot be validated
            $error_msg = $this->createStandardFormValidationErrorMessage($ex);
        } catch (\Exception $ex) {
            // Any other error
            $error_msg = $ex->getMessage();
        }

        $this->setupFormErrorContext(
            $this->getTranslator()->trans("%obj modification", array('%obj' => $this->objectName)),
            $error_msg,
            $areaCountryForm
        );

        // At this point, the form has errors, and should be redisplayed.
        return $this->renderEditionTemplate();
    }
966567
public function setObject(ChildObject $v = null)
    {
        // aggregate_column_relation behavior
        if (null !== $this->aObject && $v !== $this->aObject) {
            $this->oldObjectSkillCount = $this->aObject;
        }
        if ($v === null) {
            $this->setObjectId(NULL);
        } else {
            $this->setObjectId($v->getId());
        }

        $this->aObject = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildObject object, it will not be re-added.
        if ($v !== null) {
            $v->addSkill($this);
        }


        return $this;
    }
878136
public function setCountry($country)
    {
        $country = strtoupper($country);
        if (!Icepay_Parameter_Validation::country($country))
            throw new Exception('Country not valid');
        $this->data->ic_country = $country;
        return $this;
    }
453981
public function setClientAgent($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->client_agent !== $v) {
            $this->client_agent = $v;
            $this->modifiedColumns[LoginLogTableMap::COL_CLIENT_AGENT] = true;
        }

        return $this;
    }
375958
public function setCountryId($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

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


        return $this;
    }
1291232
public function getCompanyVatInValidator($country)
    {
        if (is_null($this->_oCompanyVatInValidator)) {
            /** @var \OxidEsales\Eshop\Core\CompanyVatInValidator $vatInValidator */
            $vatInValidator = oxNew('oxCompanyVatInValidator', $country);

            /** @var \OxidEsales\Eshop\Core\CompanyVatInCountryChecker $validator */
            $validator = oxNew(\OxidEsales\Eshop\Core\CompanyVatInCountryChecker::class);

            $vatInValidator->addChecker($validator);

            /** @var \OxidEsales\Eshop\Core\OnlineVatIdCheck $onlineValidator */
            if (!\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam("blVatIdCheckDisabled")) {
                $onlineValidator = oxNew(\OxidEsales\Eshop\Core\OnlineVatIdCheck::class);
                $vatInValidator->addChecker($onlineValidator);
            }

            $this->setCompanyVatInValidator($vatInValidator);
        }

        return $this->_oCompanyVatInValidator;
    }
725510
public function setDealerBrand(ChildDealerBrand $v = null)
    {
        if ($v === null) {
            $this->setId(NULL);
        } else {
            $this->setId($v->getId());
        }

        $this->aDealerBrand = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildDealerBrand object, it will not be re-added.
        if ($v !== null) {
            $v->addDealerBrandVersion($this);
        }


        return $this;
    }
403805
public function setCountry(Country $country = null)
    {
        if ($this->country !== $country) {
            // romove link on this item for old country
            if ($this->country instanceof Country) {
                $tmp = $this->country;
                $this->country = null;
                $tmp->removeItem($this);
            }
            $this->country = $country;
            // add link on this item
            if ($this->country instanceof Country) {
                $this->country->addItem($this);
            }
        }

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

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


        return $this;
    }
114257
public function setCustomerId($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->customer_id !== $v) {
            $this->customer_id = $v;
            $this->modifiedColumns[CustomerCustomerGroupTableMap::CUSTOMER_ID] = true;
        }

        if ($this->aCustomer !== null && $this->aCustomer->getId() !== $v) {
            $this->aCustomer = null;
        }


        return $this;
    }
1076865
public function setCustomer(\Gpupo\CommonSchema\ORM\Entity\Trading\Order\Customer\Customer $customer = null)
    {
        $this->customer = $customer;

        return $this;
    }
488637
public function addCountry($country)
    {
        if (!in_array($country, $this->countries)) {
            $this->countries[] = $country;
        }

        return $this;
    }
878899
public function setCountry($country) {
        if (empty($country))
            throw new Exception('Country must be set and cannot be empty.');

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

        return $this;
    }