HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/magento.bikenow.co/vendor/magento/module-securitytxt/Model/Config.php
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

declare(strict_types=1);

namespace Magento\Securitytxt\Model;

use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Store\Model\ScopeInterface;

/**
 * Security.txt configuration model.
 */
class Config
{
    const XML_SECURITYTXT_MODULE = 'magento_securitytxt_securitytxt';

    const XML_SECURITYTXT_ENABLED = self::XML_SECURITYTXT_MODULE . '/general/enabled';
    const XML_SECURITYTXT_EMAIL = self::XML_SECURITYTXT_MODULE . '/contact_information/email';
    const XML_SECURITYTXT_PHONE = self::XML_SECURITYTXT_MODULE . '/contact_information/phone';
    const XML_SECURITYTXT_CONTACTPAGE = self::XML_SECURITYTXT_MODULE . '/contact_information/contact_page';

    const XML_SECURITYTXT_ENCRYPTION = self::XML_SECURITYTXT_MODULE . '/other_information/encryption';
    const XML_SECURITYTXT_ACKNOWLEDGEMENTS = self::XML_SECURITYTXT_MODULE . '/other_information/acknowledgements';
    const XML_SECURITYTXT_PREFERREDLANGUAGES = self::XML_SECURITYTXT_MODULE . '/other_information/preferred_languages';
    const XML_SECURITYTXT_HIRING = self::XML_SECURITYTXT_MODULE . '/other_information/hiring';
    const XML_SECURITYTXT_POLICY = self::XML_SECURITYTXT_MODULE . '/other_information/policy';

    const XML_SECURITYTXT_SIGNATURE = self::XML_SECURITYTXT_MODULE . '/other_information/signature_text';

    /**
     * @var ScopeConfigInterface
     */
    private $scopeConfig;

    /**
     * @param ScopeConfigInterface $scopeConfig
     */
    public function __construct(ScopeConfigInterface $scopeConfig)
    {
        $this->scopeConfig = $scopeConfig;
    }

    /**
     * Check if securitytxt module is enabled in configuration.
     *
     * @return bool
     */
    public function isEnabled(): bool
    {
        return (bool)$this->scopeConfig->getValue(static::XML_SECURITYTXT_ENABLED, ScopeInterface::SCOPE_WEBSITE);
    }

    /**
     * Get configuration for securitytxt email field.
     *
     * @return string
     */
    public function getEmail(): string
    {
        return $this->scopeConfig->getValue(static::XML_SECURITYTXT_EMAIL, ScopeInterface::SCOPE_WEBSITE) ?: '';
    }

    /**
     * Get configuration for securitytxt phone field.
     *
     * @return string
     */
    public function getPhone(): string
    {
        return $this->scopeConfig->getValue(static::XML_SECURITYTXT_PHONE, ScopeInterface::SCOPE_WEBSITE) ?: '';
    }

    /**
     * Get configuration for securitytxt contact page field.
     *
     * @return string
     */
    public function getContactPage(): string
    {
        return $this->scopeConfig->getValue(static::XML_SECURITYTXT_CONTACTPAGE, ScopeInterface::SCOPE_WEBSITE) ?: '';
    }

    /**
     * Get configuration for securitytxt encryption url field.
     *
     * @return string
     */
    public function getEncryption(): string
    {
        return $this->scopeConfig->getValue(static::XML_SECURITYTXT_ENCRYPTION, ScopeInterface::SCOPE_WEBSITE) ?: '';
    }

    /**
     * Get configuration for securitytxt acknowledgments field.
     *
     * @return string
     */
    public function getAcknowledgements(): string
    {
        return $this->scopeConfig
            ->getValue(static::XML_SECURITYTXT_ACKNOWLEDGEMENTS, ScopeInterface::SCOPE_WEBSITE) ?: '';
    }

    /**
     * Get configuration for securitytxt preferred languages field.
     *
     * @return string
     */
    public function getPreferredLanguages(): string
    {
        return $this->scopeConfig
            ->getValue(static::XML_SECURITYTXT_PREFERREDLANGUAGES, ScopeInterface::SCOPE_WEBSITE) ?: '';
    }

    /**
     * Get configuration for securitytxt hiring url field.
     *
     * @return string
     */
    public function getHiring(): string
    {
        return $this->scopeConfig->getValue(static::XML_SECURITYTXT_HIRING, ScopeInterface::SCOPE_WEBSITE) ?: '';
    }

    /**
     * Get configuration for securitytxt policy url field.
     *
     * @return string
     */
    public function getPolicy(): string
    {
        return $this->scopeConfig->getValue(static::XML_SECURITYTXT_POLICY, ScopeInterface::SCOPE_WEBSITE) ?: '';
    }

    /**
     * Get configuration for securitytxt signature field.
     *
     * @return string
     */
    public function getSignature(): string
    {
        return $this->scopeConfig->getValue(static::XML_SECURITYTXT_SIGNATURE, ScopeInterface::SCOPE_WEBSITE) ?: '';
    }
}