<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
class AddressState {
/**
* @var integer
*/
private $id;
/**
* @var string
*/
private $name;
/**
* @var string
*/
private $shortname;
/**
* @var string
*/
private $isoCode;
/**
* @var \App\Entity\AddressCountry
*/
private $addressCountry;
/**
* Get id
*
* @return integer
*/
public function getId() {
return $this->id;
}
public function setId($id) {
$this->id = $id;
}
/**
* Set name
*
* @param string $name
*
* @return AddressState
*/
public function setName($name) {
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName() {
return $this->name;
}
/**
* Set shortname
*
* @param string $shortname
*
* @return AddressState
*/
public function setShortname($shortname) {
$this->shortname = $shortname;
return $this;
}
/**
* Get shortname
*
* @return string
*/
public function getShortname() {
return $this->shortname;
}
/**
* Set isoCode
*
* @param string $isoCode
*
* @return AddressState
*/
public function setIsoCode($isoCode) {
$this->isoCode = $isoCode;
return $this;
}
/**
* Get isoCode
*
* @return string
*/
public function getIsoCode() {
return $this->isoCode;
}
/**
* Set addressCountry.
*
* @param \App\Entity\AddressCountry|null $addressCountry
*
* @return AddressState
*/
public function setAddressCountry(\App\Entity\AddressCountry $addressCountry = null) {
$this->addressCountry = $addressCountry;
return $this;
}
/**
* Get addressCountry.
*
* @return \App\Entity\AddressCountry|null
*/
public function getAddressCountry() {
return $this->addressCountry;
}
/**
* Get country code
*
* @return string
*/
public function getCountryCode() {
if (!is_null($this->addressCountry)) {
return $this->addressCountry->getShortname();
}
return '';
}
/**
* Get country code
*
* @return string
*/
public function getCountry() {
if (!is_null($this->addressCountry)) {
return $this->addressCountry->getName();
}
return '';
}
}