当前位置: 首页>>代码示例>>PHP>>正文


PHP ConfigFactory::create方法代码示例

本文整理汇总了PHP中ConfigFactory::create方法的典型用法代码示例。如果您正苦于以下问题:PHP ConfigFactory::create方法的具体用法?PHP ConfigFactory::create怎么用?PHP ConfigFactory::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ConfigFactory的用法示例。


在下文中一共展示了ConfigFactory::create方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * @param ConfigFactory $configFactory
  * @param ResolverInterface $localeResolver
  * @param CurrentCustomer $currentCustomer
  * @param PayfastHelper $paymentHelper
  * @param PaymentHelper $paymentHelper
  */
 public function __construct(\Psr\Log\LoggerInterface $logger, ConfigFactory $configFactory, ResolverInterface $localeResolver, CurrentCustomer $currentCustomer, PayfastHelper $payfastHelper, PaymentHelper $paymentHelper)
 {
     $this->_logger = $logger;
     $pre = __METHOD__ . ' : ';
     $this->_logger->debug($pre . 'bof');
     $this->localeResolver = $localeResolver;
     $this->config = $configFactory->create();
     $this->currentCustomer = $currentCustomer;
     $this->payfastHelper = $payfastHelper;
     $this->paymentHelper = $paymentHelper;
     foreach ($this->methodCodes as $code) {
         $this->methods[$code] = $this->paymentHelper->getMethodInstance($code);
     }
     $this->_logger->debug($pre . 'eof and this  methods has : ', $this->methods);
 }
开发者ID:PayFast,项目名称:mod-magento_2,代码行数:22,代码来源:PayfastConfigProvider.php

示例2: __construct

 /**
  * @param \Magento\Framework\Model\Context $context
  * @param \Magento\Framework\Registry $registry
  * @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory
  * @param \Magento\Framework\Api\AttributeValueFactory $customAttributeFactory
  * @param \Magento\Payment\Helper\Data $paymentData
  * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
  * @param \Magento\Payment\Model\Method\Logger $logger
  * @param \Payfast\Payfast\Model\ConfigFactory $configFactory
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\Framework\UrlInterface $urlBuilder
  * @param \Payfast\Payfast\Model\CartFactory $cartFactory
  * @param \Magento\Checkout\Model\Session $checkoutSession
  * @param \Magento\Framework\Exception\LocalizedExceptionFactory $exception
  * @param \Magento\Sales\Api\TransactionRepositoryInterface $transactionRepository
  * @param Transaction\BuilderInterface $transactionBuilder
  * @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
  * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
  * @param array $data
  * @SuppressWarnings(PHPMD.ExcessiveParameterList)
  */
 public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory, \Magento\Framework\Api\AttributeValueFactory $customAttributeFactory, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Payment\Model\Method\Logger $logger, ConfigFactory $configFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\UrlInterface $urlBuilder, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Framework\Exception\LocalizedExceptionFactory $exception, \Magento\Sales\Api\TransactionRepositoryInterface $transactionRepository, \Magento\Sales\Model\Order\Payment\Transaction\BuilderInterface $transactionBuilder, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
 {
     parent::__construct($context, $registry, $extensionFactory, $customAttributeFactory, $paymentData, $scopeConfig, $logger, $resource, $resourceCollection, $data);
     $this->_storeManager = $storeManager;
     $this->_urlBuilder = $urlBuilder;
     $this->_checkoutSession = $checkoutSession;
     $this->_exception = $exception;
     $this->transactionRepository = $transactionRepository;
     $this->transactionBuilder = $transactionBuilder;
     $parameters = ['params' => [$this->_code]];
     $this->_config = $configFactory->create($parameters);
     if (!defined('PF_DEBUG')) {
         define('PF_DEBUG', $this->getConfigData('debug'));
     }
 }
开发者ID:PayFast,项目名称:mod-magento_2,代码行数:36,代码来源:Payfast.php


注:本文中的ConfigFactory::create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。