mirror of
https://github.com/bdnugget/magento2.git
synced 2026-11-07 09:17:35 +00:00
41 lines
880 B
PHP
41 lines
880 B
PHP
<?php
|
|
/**
|
|
* Copyright © Magento, Inc. All rights reserved.
|
|
* See COPYING.txt for license details.
|
|
*/
|
|
namespace Magento\GiftMessage\Model;
|
|
|
|
use Magento\Checkout\Model\ConfigProviderInterface;
|
|
|
|
/**
|
|
* Class CompositeConfigProvider
|
|
*/
|
|
class CompositeConfigProvider implements ConfigProviderInterface
|
|
{
|
|
/**
|
|
* @var ConfigProviderInterface[]
|
|
*/
|
|
private $configProviders;
|
|
|
|
/**
|
|
* @param ConfigProviderInterface[] $configProviders
|
|
*/
|
|
public function __construct(
|
|
array $configProviders = []
|
|
) {
|
|
$this->configProviders = $configProviders;
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function getConfig()
|
|
{
|
|
$config = [];
|
|
foreach ($this->configProviders as $configProvider) {
|
|
$config = array_merge_recursive($config, $configProvider->getConfig());
|
|
}
|
|
return $config;
|
|
}
|
|
}
|