PHP Class Wrep\Notificato\Apns\Certificate

Inheritance: implements Serializable
Afficher le fichier Open project: wrep/notificato Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( $pemFile, $passphrase = null, $validate = true, $endpointEnv = null ) APNS Certificate constructor
getDescription ( ) : string An as humanreadable as possible description of the certificate to identify the certificate
getEndpoint ( $endpointType ) : string Get the endpoint this certificate is valid for
getEnvironment ( ) : Certificate::ENDPOINT_ENV_PRODUCTION | Certificate::ENDPOINT_ENV_SANDBOX Get the APNS environment this certificate is associated with
getFingerprint ( ) : string Get a unique hash of the certificate this can be used to check if two Apns\Certificate objects are the same
getPassphrase ( ) : string Passphrase to use with the PEM file
getPemFile ( ) : string Get the path to the PEM file
getValidFrom ( ) : DateTime | null Get moment this certificate will become valid Note: Will return null if certificate validation was disabled
getValidTo ( ) : DateTime | null Get moment this certificate will expire Note: Will return null if certificate validation was disabled
hasPassphrase ( ) : boolean Checks if there is a passphrase to use with the certificate
isValidated ( ) : boolean Check if this certificate is validated
serialize ( ) : string String representation of object
unserialize ( $serialized ) Constructs the object from serialized data

Private Methods

Méthode Description
parseCertificate ( ) Parse and validate the certificate and private key, also extracts usefull data and sets it on this object Also throws exceptions if the certificate/private key doesn't seem to be a valid APNS cert

Method Details

__construct() public méthode

APNS Certificate constructor
public __construct ( $pemFile, $passphrase = null, $validate = true, $endpointEnv = null )

getDescription() public méthode

An as humanreadable as possible description of the certificate to identify the certificate
public getDescription ( ) : string
Résultat string

getEndpoint() public méthode

Get the endpoint this certificate is valid for
public getEndpoint ( $endpointType ) : string
Résultat string

getEnvironment() public méthode

Get the APNS environment this certificate is associated with
public getEnvironment ( ) : Certificate::ENDPOINT_ENV_PRODUCTION | Certificate::ENDPOINT_ENV_SANDBOX
Résultat Certificate::ENDPOINT_ENV_PRODUCTION | Certificate::ENDPOINT_ENV_SANDBOX

getFingerprint() public méthode

Get a unique hash of the certificate this can be used to check if two Apns\Certificate objects are the same
public getFingerprint ( ) : string
Résultat string

getPassphrase() public méthode

Passphrase to use with the PEM file
public getPassphrase ( ) : string
Résultat string

getPemFile() public méthode

Get the path to the PEM file
public getPemFile ( ) : string
Résultat string

getValidFrom() public méthode

Get moment this certificate will become valid Note: Will return null if certificate validation was disabled
public getValidFrom ( ) : DateTime | null
Résultat DateTime | null

getValidTo() public méthode

Get moment this certificate will expire Note: Will return null if certificate validation was disabled
public getValidTo ( ) : DateTime | null
Résultat DateTime | null

hasPassphrase() public méthode

Checks if there is a passphrase to use with the certificate
public hasPassphrase ( ) : boolean
Résultat boolean

isValidated() public méthode

Check if this certificate is validated
public isValidated ( ) : boolean
Résultat boolean

serialize() public méthode

String representation of object
public serialize ( ) : string
Résultat string

unserialize() public méthode

Constructs the object from serialized data
public unserialize ( $serialized )