![]() 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/cartforge.co/vendor/magento/module-sales/Model/Order/Email/Container/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Sales\Model\Order\Email\Container; use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Store\Model\Store; use Magento\Store\Model\StoreManagerInterface; /** * Class Container * * @api * @since 100.0.2 */ abstract class Container implements IdentityInterface { /** * @var StoreManagerInterface */ protected $storeManager; /** * Core store config * * @var ScopeConfigInterface */ protected $scopeConfig; /** * @var Store */ protected $store; /** * @var string */ protected $customerName; /** * @var string */ protected $customerEmail; /** * @param ScopeConfigInterface $scopeConfig * @param StoreManagerInterface $storeManager */ public function __construct( ScopeConfigInterface $scopeConfig, StoreManagerInterface $storeManager ) { $this->scopeConfig = $scopeConfig; $this->storeManager = $storeManager; } /** * Return store configuration value * * @param string $path * @param int $storeId * @return mixed */ protected function getConfigValue($path, $storeId) { return $this->scopeConfig->getValue( $path, \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $storeId ); } /** * Set current store * * @param Store $store * @return void */ public function setStore(Store $store) { $this->store = $store; } /** * Return store * * @return Store */ public function getStore() { //current store if ($this->store instanceof Store) { return $this->store; } return $this->storeManager->getStore(); } /** * Set customer name * * @param string $name * @return void */ public function setCustomerName($name) { $this->customerName = $name; } /** * Set customer email * * @param string $email * @return void */ public function setCustomerEmail($email) { $this->customerEmail = $email; } /** * Return customer name * * @return string */ public function getCustomerName() { return $this->customerName; } /** * Return customer email * * @return string */ public function getCustomerEmail() { return $this->customerEmail; } }