當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Repository::get方法代碼示例

本文整理匯總了PHP中Repository::get方法的典型用法代碼示例。如果您正苦於以下問題:PHP Repository::get方法的具體用法?PHP Repository::get怎麽用?PHP Repository::get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Repository的用法示例。


在下文中一共展示了Repository::get方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testGet

 public function testGet()
 {
     $optionId = 1;
     $productSku = 'simple_product';
     $this->productRepositoryMock->expects($this->once())->method('get')->with($productSku, false)->willReturn($this->productMock);
     $this->productMock->expects($this->once())->method('getOptionById')->with($optionId)->willReturn($this->optionMock);
     $this->assertEquals($this->optionMock, $this->optionRepository->get($productSku, $optionId));
 }
開發者ID:,項目名稱:,代碼行數:8,代碼來源:

示例2: registerEventListeners

 protected function registerEventListeners()
 {
     $registrationModel = $this->config->get('auth::registration_strategy');
     switch ($registrationModel) {
         case 'single_opt_in':
             $this->event->listen('Ipunkt.Auth.*', 'Ipunkt\\Auth\\Listeners\\SingleOptInListener');
             break;
         case 'double_opt_in':
             $this->event->listen('Ipunkt.Auth.*', 'Ipunkt\\Auth\\Listeners\\DoubleOptInListener');
             break;
         default:
     }
 }
開發者ID:ipunkt,項目名稱:auth,代碼行數:13,代碼來源:AuthServiceProvider.php

示例3: fire

 /**
  * @param Job $job
  * @param mixed $models
  */
 public function fire(Job $job, $models)
 {
     $loggerContainerBinding = $this->config->get('logger', 'menthol.flexible.logger');
     $logger = $this->app->make($loggerContainerBinding);
     foreach ($models as $model) {
         list($class, $id) = explode(':', $model);
         $logger->info('Deleting ' . $class . ' with ID: ' . $id . ' from Elasticsearch');
         $model = new $class();
         if (method_exists($model, 'getProxy')) {
             $model->deleteDoc($id);
         }
     }
     $job->delete();
 }
開發者ID:menthol,項目名稱:Flexible,代碼行數:18,代碼來源:DeleteJob.php

示例4: getDefaultDriver

 /**
  * Get the default provider driver name.
  *
  * @throws UnknownPaymentGatewayException
  *
  * @return string
  */
 public function getDefaultDriver()
 {
     $driver = strtolower($this->config->get('lara-pay-ng.gateways.driver'));
     if (in_array($driver, ['gtpay', 'webpay', 'voguepay', 'simplepay', 'cashenvoy'])) {
         return $driver;
     }
     throw new UnknownPaymentGatewayException();
 }
開發者ID:nsystem1,項目名稱:lara-pay-ng,代碼行數:15,代碼來源:PaymentGatewayManager.php

示例5: getGatewayConfig

 /**
  * @param $gateway
  * @param $key
  * @param $keywithdot
  *
  * @return mixed|string
  */
 private function getGatewayConfig($gateway, $key, $keywithdot)
 {
     if ($key == '*') {
         return $this->config->get('lara-pay-ng.gateways.' . $gateway);
     }
     if (!array_key_exists($key, $this->config->get('lara-pay-ng.gateways.' . $gateway))) {
         return 'Trying to get an Unknown ' . $gateway . ' Config';
     }
     return $this->config->get('lara-pay-ng.gateways.' . $gateway . $keywithdot);
 }
開發者ID:nsystem1,項目名稱:lara-pay-ng,代碼行數:17,代碼來源:Helpers.php


注:本文中的Repository::get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。