Skip to content

Commit 16b3647

Browse files
authored
Merge pull request #257 from grulex/master
Adding api_key for the YandexFactory
2 parents cfda185 + c7ad49f commit 16b3647

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ProviderFactory/YandexFactory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,19 @@ protected function getProvider(array $config): Provider
2727
{
2828
$httplug = $config['httplug_client'] ?: HttpClientDiscovery::find();
2929

30-
return new Yandex($httplug, $config['toponym']);
30+
return new Yandex($httplug, $config['toponym'], $config['api_key']);
3131
}
3232

3333
protected static function configureOptionResolver(OptionsResolver $resolver)
3434
{
3535
$resolver->setDefaults([
3636
'httplug_client' => null,
3737
'toponym' => null,
38+
'api_key' => null,
3839
]);
3940

4041
$resolver->setAllowedTypes('httplug_client', ['object', 'null']);
4142
$resolver->setAllowedTypes('toponym', ['string', 'null']);
43+
$resolver->setAllowedTypes('api_key', ['string', 'null']);
4244
}
4345
}

0 commit comments

Comments
 (0)