/** * To configure smtp settings for session right before sending message on windows server * * @param \Magento\Framework\Mail\TransportInterface $subject * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeSendMessage(\Magento\Framework\Mail\TransportInterface $subject) { if ($this->osInfo->isWindows()) { ini_set('SMTP', $this->config->getValue(self::XML_SMTP_HOST)); ini_set('smtp_port', $this->config->getValue(self::XML_SMTP_PORT)); } }
/** * Filter config values. * * @param Converter $subject * @param array $nodes * @return array * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterConvert(Converter $subject, $nodes) { if (empty($nodes)) { return $nodes; } $useInsecure = $this->config->getValue(self::XML_ALLOW_INSECURE); if ($useInsecure) { foreach (array_keys($this->resources) as $resource) { list($route, $requestType) = explode("::", $resource); if ($result = $this->getNode($route, $requestType, $nodes["routes"])) { if (isset($result[$requestType]['resources'])) { $result[$requestType]['resources'] = ['anonymous' => true]; $nodes['routes'][$route] = $result; } if (isset($result[$requestType]['service']['class']) && isset($result[$requestType]['service']['method'])) { $serviceName = $result[$requestType]['service']['class']; $serviceMethod = $result[$requestType]['service']['method']; $nodes['services'][$serviceName]['V1']['methods'][$serviceMethod]['resources'] = ['anonymous']; } } } } return $nodes; }
/** * Retrieve store group name * * @return string */ public function getFrontendName() { if (null === $this->_frontendName) { $storeGroupName = (string) $this->_config->getValue(Information::XML_PATH_STORE_INFO_NAME, ScopeInterface::SCOPE_STORE, $this); $this->_frontendName = !empty($storeGroupName) ? $storeGroupName : $this->getGroup()->getName(); } return $this->_frontendName; }
/** * Retrieve storegroup name * * @return string */ public function getFrontendName() { if (null === $this->_frontendName) { $storeGroupName = (string) $this->_config->getValue('general/store_information/name', \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $this); $this->_frontendName = !empty($storeGroupName) ? $storeGroupName : $this->getGroup()->getName(); } return $this->_frontendName; }
/** * Get period of time in seconds after which account will be unlocked. * * @return int */ public function getLockTimeout() { return (int) $this->storeConfig->getValue('oauth/authentication_lock/timeout'); }