class CertificateFactory

Methods

__construct(string|null $pemFile = null, string|null $passphrase = null, boolean $validate = true, string|null $endpointEnv = null)

Create the CertificateFactory

setDefaultCertificate(Certificate $defaultCertificate = null)

Set the default certificate

getDefaultCertificate()

Get the current default certificate

createCertificate(string $pemFile, string|null $passphrase = null, boolean $validate = true, string|null $endpointEnv = null)

Create a Certificate

Details

at line 19
__construct(string|null $pemFile = null, string|null $passphrase = null, boolean $validate = true, string|null $endpointEnv = null)

Create the CertificateFactory

Parameters

string|null $pemFile Path to the PEM certificate file of the default certificate
string|null $passphrase Passphrase to use with the PEM file
boolean $validate Set to false to skip the validation of the certificate, default true
string|null $endpointEnv APNS environment this certificate is valid for, by default autodetects during validation

at line 32
setDefaultCertificate(Certificate $defaultCertificate = null)

Set the default certificate

Parameters

Certificate $defaultCertificate The certificate to use as default

at line 42
Certificate|null getDefaultCertificate()

Get the current default certificate

Return Value

Certificate|null

at line 56
Certificate createCertificate(string $pemFile, string|null $passphrase = null, boolean $validate = true, string|null $endpointEnv = null)

Create a Certificate

Parameters

string $pemFile Path to the PEM certificate file
string|null $passphrase Passphrase to use with the PEM file
boolean $validate Set to false to skip the validation of the certificate, default true
string|null $endpointEnv APNS environment this certificate is valid for, by default autodetects during validation

Return Value

Certificate