Constructor
public __construct ( boolean $sandbox, string $pem, string $passphrase = "", boolean $jsonUnescapedUnicode = FALSE, integer $timeout = 60, string $cachedir = "", RMS\PushNotificationsBundle\Service\EventListener $eventListener = null, Psr\Log\LoggerInterface $logger = null ) | ||
$sandbox | boolean | |
$pem | string | |
$passphrase | string | |
$jsonUnescapedUnicode | boolean | |
$timeout | integer | |
$cachedir | string | |
$eventListener | RMS\PushNotificationsBundle\Service\EventListener | |
$logger | Psr\Log\LoggerInterface |
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); $iosSandbox = $app->getConfigPackages()[KeosuGadgetPushNotificationBundle::PACKAGE_NAME]['iosSandbox']; $iosPassPhrase = $app->getConfigPackages()[KeosuGadgetPushNotificationBundle::PACKAGE_NAME]['iosPassPhrase']; $iosPem = $app->getConfigPackages()[KeosuGadgetPushNotificationBundle::PACKAGE_NAME]['iosPem']; if (!is_file($iosPem)) { throw new \LogicException('Can\'t send message because ios pem file isn\'t uploaded'); } parent::__construct($iosSandbox, $iosPem, $iosPassPhrase, false, 60, null, null, $logger); }