【magento2.1源码分析】范围配置接口 ScopeConfigInterface.php

<?php
/**
 * Configuration interface
 *
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

namespace Magento\Framework\App\Config;

/**
 * 范围配置接口
 */
interface ScopeConfigInterface
{
    /**
     * 默认范围类型
     */
    const SCOPE_TYPE_DEFAULT = 'default';

    /**
     * 通过路径和范围获取配置
     *
     * @param string $path The path through the tree of configuration values, e.g., 'general/store_information/name'
     * @param string $scopeType The scope to use to determine config value, e.g., 'store' or 'default'
     * @param null|string $scopeCode
     * @return mixed
     */
    public function getValue($path, $scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = null);

    /**
     * 判断是否设置标识
     *
     * @param string $path The path through the tree of configuration values, e.g., 'general/store_information/name'
     * @param string $scopeType The scope to use to determine config value, e.g., 'store' or 'default'
     * @param null|string $scopeCode
     * @return bool
     */
    public function isSetFlag($path, $scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = null);
}

猜你喜欢

转载自blog.csdn.net/qq2942713658/article/details/81226115