本文整理汇总了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));
}
示例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:
}
}
示例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();
}
示例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();
}
示例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);
}