Constructor
public __construct ( string $apiKey, boolean $useMultiCurl, integer $timeout, Psr\Log\LoggerInterface $logger, Buzz\Client\AbstractCurl $client = null, boolean $dryRun = false ) | ||
$apiKey | string | |
$useMultiCurl | boolean | |
$timeout | integer | |
$logger | Psr\Log\LoggerInterface | |
$client | Buzz\Client\AbstractCurl | (optional) |
$dryRun | boolean |
public function __construct($container) { $logger = $container->get('logger'); $em = $container->get('doctrine')->getManager(); $appId = $container->get('keosu_core.curapp')->getCurApp(); $app = $em->getRepository('KeosuCoreBundle:App')->find($appId); $googleGcmApiKey = $app->getConfigPackages()[KeosuGadgetPushNotificationBundle::PACKAGE_NAME]['googleGcmApiKey']; $googleUseMultiCurl = $app->getConfigPackages()[KeosuGadgetPushNotificationBundle::PACKAGE_NAME]['googleUseMultiCurl']; if ($googleGcmApiKey === null) { throw new \LogicException('Can\'t send message because google gcm api key in not defined'); } parent::__construct($googleGcmApiKey, $googleUseMultiCurl, 60, $logger); }