Property | Type | Description | |
---|---|---|---|
$apnStreams | array | Array for streams to APN | |
$cachedir | string | Cache dir used for cache pem file | |
$jsonUnescapedUnicode | boolean | JSON_UNESCAPED_UNICODE | |
$lastMessageId | integer | Last used message ID | |
$logger | Psr\Log\LoggerInterface | Monolog logger | |
$messages | array | Array for messages to APN | |
$passphrase | string | Passphrase for PEM file | |
$pemContent | string | Content of PEM | |
$pemContentPassphrase | string | Passphrase for PEM content | |
$pemPath | string | Path to PEM file | |
$responses | array | Collection of the responses from the APN | |
$timeout | integer | Connection timeout | |
$useSandbox | boolean | Whether or not to use the sandbox APNS |
Method | Description | |
---|---|---|
__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 ) | Constructor | |
createMdmPayload ( string $token, string $magicPushToken ) : string | Creates a MDM payload | |
getResponses ( ) : array | Returns responses | |
onKernelTerminate ( ) | Called on kernel terminate | |
send ( RMS\PushNotificationsBundle\Message\MessageInterface $message ) : boolean | Send a MDM or notification message | |
setJsonUnescapedUnicode ( boolean $jsonUnescapedUnicode ) | Set option JSON_UNESCAPED_UNICODE to json encoders | |
setPemAsString ( $pemContent, $passphrase ) |
Method | Description | |
---|---|---|
closeApnStream ( string $apnURL ) | Close the apn stream associated with the given apn URL | |
createPayload ( integer $messageId, string $expiry, string $token, array $message ) : string | Creates the full payload for the notification | |
getApnStream ( string $apnURL ) : resource | Get an apn stream associated with the given apn URL, create one if necessary | |
getStreamContext ( ) : resource | Gets a stream context set up for SSL using our PEM file and passphrase | |
sendMessages ( integer $firstMessageId, string $apnURL ) : integer | Send all notification messages starting from the given ID | |
writeApnStream ( string $apnURL, string $payload ) : mixed | Write data to the apn stream that is associated with the given apn URL |
Method | Description | |
---|---|---|
closeStreams ( ) | Close existing streams | |
removeCachedPemFile ( ) | Remove cache pem file |
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 |
protected closeApnStream ( string $apnURL ) | ||
$apnURL | string |
protected getApnStream ( string $apnURL ) : resource | ||
$apnURL | string | |
return | resource |
protected getStreamContext ( ) : resource | ||
return | resource |
public setJsonUnescapedUnicode ( boolean $jsonUnescapedUnicode ) | ||
$jsonUnescapedUnicode | boolean |
public setPemAsString ( $pemContent, $passphrase ) | ||
$pemContent | ||
$passphrase |
protected string $cachedir | ||
return | string |
protected bool $jsonUnescapedUnicode | ||
return | boolean |
protected int $lastMessageId | ||
return | integer |
protected LoggerInterface,Psr\Log $logger | ||
return | Psr\Log\LoggerInterface |
protected string $passphrase | ||
return | string |
protected string $pemContentPassphrase | ||
return | string |
protected array $responses | ||
return | array |
protected bool $useSandbox | ||
return | boolean |