Source of file CountryTrait.php
Size: 1,233 Bytes - Last Modified: 2021-12-24T06:51:34+00:00
/var/www/docs.ssmods.com/process/src/src/Locale/Traits/CountryTrait.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 | <?php /** * This file is part of the Ecommerce-Core package * * @package Ecommerce-Core */ /** * Traits namespace */ namespace Heystack\Ecommerce\Locale\Traits; use Heystack\Core\GenerateContainerDataObjectTrait; use Heystack\Core\Identifier\Identifier; /** * Provides a basic implementation of the CountryInterface for dataobjects * * @copyright Heyday * @author Glenn Bautista <glenn@heyday.co.nz> * @author Cam Spiers <cameron@heyday.co.nz> * @package Ecommerce-Core */ trait CountryTrait { use GenerateContainerDataObjectTrait; /** * @return \Heystack\Core\Identifier\Identifier */ public function getIdentifier() { return new Identifier($this->getCountryCode()); } /** * @return mixed */ public function getName() { return $this->getField('Name'); } /** * @return mixed */ public function getCountryCode() { return $this->getField('CountryCode'); } /** * @return mixed */ public function isDefault() { return $this->getField('IsDefault'); } /** * @param string $field * @return mixed */ public abstract function getField($field); } |