![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/extmag/shiplab/Model/ |
<?php /** * Copyright © Extmag. All rights reserved. */ namespace Extmag\Shiplab\Model; use Extmag\Shiplab\Api\Data\AccessPointInterface; use Magento\Directory\Model\CountryFactory; use Magento\Framework\Data\Collection\AbstractDb; use Magento\Framework\Model\AbstractModel; use Magento\Framework\Model\Context; use Magento\Framework\Model\ResourceModel\AbstractResource; use Magento\Framework\Registry; class AccessPoint extends AbstractModel implements AccessPointInterface { /** * @var CountryFactory */ protected $countryFactory; /** * @param Context $context * @param Registry $registry * @param CountryFactory $countryFactory * @param AbstractResource|null $resource * @param AbstractDb|null $resourceCollection * @param array $data */ public function __construct( Context $context, Registry $registry, CountryFactory $countryFactory, AbstractResource $resource = null, AbstractDb $resourceCollection = null, array $data = [] ) { parent::__construct($context, $registry, $resource, $resourceCollection, $data); $this->countryFactory = $countryFactory; } /** * @inheritDoc */ protected function _construct() { parent::_construct(); $this->_init(ResourceModel\AccessPoint::class); } /** * @inheritDoc */ public function getId() { return parent::getData(self::ENTITY_ID); } /** * @inheritDoc */ public function getName() { return parent::getData(self::NAME); } /** * @inheritDoc */ public function getCreatedTime() { return parent::getData(self::CREATED_TIME); } /** * @inheritDoc */ public function getUpdateTime() { return parent::getData(self::UPDATED_TIME); } /** * @inheritDoc */ public function setId($value) { return $this->setData(self::ENTITY_ID, $value); } /** * @inheritDoc */ public function setName($name) { return $this->setData(self::NAME, $name); } /** * @inheritDoc */ public function setCreatedTime($createdTime) { return $this->setData(self::CREATED_TIME, $createdTime); } /** * @param string $updateTime * @return AccessPointInterface */ public function setUpdateTime($updateTime) { return $this->setData(self::UPDATED_TIME, $updateTime); } /** * @inheritDoc */ public function getAppuId() { return parent::getData(self::APPUID); } /** * @inheritDoc */ public function getAddLine1() { return parent::getData(self::ADDLINE1); } /** * @inheritDoc */ public function getAddLine2() { return parent::getData(self::ADDLINE2); } /** * @inheritDoc */ public function getAddLine3() { return parent::getData(self::ADDLINE3); } /** * @inheritDoc */ public function getCity() { return parent::getData(self::CITY); } /** * @inheritDoc */ public function getPostal() { return parent::getData(self::POSTAL); } /** * @inheritDoc */ public function getCountry() { return parent::getData(self::COUNTRY); } /** * @inheritDoc */ public function getCarrierCode() { return parent::getData(self::CARRIER_CODE); } public function getCountryName() { return $this->countryFactory->create()->loadByCode(parent::getData(self::COUNTRY))->getName(); } /** * @inheritDoc */ public function getState() { return parent::getData(self::STATE); } /** * @inheritDoc */ public function setAppuId($appuId) { return $this->setData(self::APPUID, $appuId); } /** * @inheritDoc */ public function setAddLine1($addLine1) { return $this->setData(self::ADDLINE1, $addLine1); } /** * @inheritDoc */ public function setAddLine2($addLine2) { return $this->setData(self::ADDLINE2, $addLine2); } /** * @inheritDoc */ public function setAddLine3($addLine3) { return $this->setData(self::ADDLINE3, $addLine3); } /** * @inheritDoc */ public function setCity($city) { return $this->setData(self::CITY, $city); } /** * @inheritDoc */ public function setPostal($postal) { return $this->setData(self::POSTAL, $postal); } /** * @inheritDoc */ public function setCountry($country) { return $this->setData(self::COUNTRY, $country); } /** * @inheritDoc */ public function setCarrierCode($carrierCode) { return $this->setData(self::CARRIER_CODE, $carrierCode); } /** * @inheritDoc */ public function setState($state) { return $this->setData(self::STATE, $state); } /** * @inheritDoc */ public function getOrderId() { return parent::getData(self::ORDER_ID); } /** * @inheritDoc */ public function setOrderId($order_id) { return $this->setData(self::ORDER_ID, $order_id); } /** * @inheritDoc */ public function getOrderIncrementId() { return parent::getData(self::ORDER_INCREMENT_ID); } /** * @inheritDoc */ public function setOrderIncrementId($orderIncrementId) { return $this->setData(self::ORDER_INCREMENT_ID, $orderIncrementId); } }