<?php
/**
* Landofcoder
*
* NOTICE OF LICENSE
*
* This source file is subject to the Landofcoder.com license that is
* available through the world-wide-web at this URL:
* https://landofcoder.com/terms
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Landofcoder
* @package Lofmp_FlatRateShipping
* @copyright Copyright (c) 2021 Landofcoder (https://www.landofcoder.com/)
* @license https://landofcoder.com/terms
*/
namespace Lofmp\FlatRateShipping\Model;
use Lofmp\FlatRateShipping\Api\Data\FlatRateShippingInterface;
use Magento\Framework\DataObject\IdentityInterface;
use \Magento\Framework\Model\AbstractModel;
class Shipping extends AbstractModel implements FlatRateShippingInterface, IdentityInterface
{
/**
* CMS page cache tag
*/
const CACHE_TAG = 'lofmpflatrateshipping';
/**
* @var string
*/
protected $_cacheTag = 'lofmpflatrateshipping';
/**
* Prefix of model events names
*
* @var string
*/
protected $_eventPrefix = 'lofmpflatrateshipping';
/**
* Initialize resource model
*
* @return void
*/
protected function _construct()
{
$this->_init(\Lofmp\FlatRateShipping\Model\ResourceModel\Shipping::class);
}
/**
* Return unique ID(s) for each object in system
*
* @return array
*/
public function getIdentities()
{
return [self::CACHE_TAG . '_' . $this->getLofmpshippingId()];
}
/**
* Get ID
*
* @return int|null
*/
public function getLofmpshippingId()
{
return $this->getData(self::LOFMPSHIPPING_ID);
}
/**
* @param int $id
* @return FlatRateShippingInterface|Shipping
*/
public function setLofmpshippingId($id)
{
return $this->setData(self::LOFMPSHIPPING_ID, $id);
}
}
|