PHP Класс Wrep\Notificato\Apns\Certificate

Наследование: implements Serializable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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

Приватные методы

Метод Описание
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

Описание методов

__construct() публичный Метод

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

getDescription() публичный Метод

An as humanreadable as possible description of the certificate to identify the certificate
public getDescription ( ) : string
Результат string

getEndpoint() публичный Метод

Get the endpoint this certificate is valid for
public getEndpoint ( $endpointType ) : string
Результат string

getEnvironment() публичный Метод

Get the APNS environment this certificate is associated with
public getEnvironment ( ) : Certificate::ENDPOINT_ENV_PRODUCTION | Certificate::ENDPOINT_ENV_SANDBOX
Результат Certificate::ENDPOINT_ENV_PRODUCTION | Certificate::ENDPOINT_ENV_SANDBOX

getFingerprint() публичный Метод

Get a unique hash of the certificate this can be used to check if two Apns\Certificate objects are the same
public getFingerprint ( ) : string
Результат string

getPassphrase() публичный Метод

Passphrase to use with the PEM file
public getPassphrase ( ) : string
Результат string

getPemFile() публичный Метод

Get the path to the PEM file
public getPemFile ( ) : string
Результат string

getValidFrom() публичный Метод

Get moment this certificate will become valid Note: Will return null if certificate validation was disabled
public getValidFrom ( ) : DateTime | null
Результат DateTime | null

getValidTo() публичный Метод

Get moment this certificate will expire Note: Will return null if certificate validation was disabled
public getValidTo ( ) : DateTime | null
Результат DateTime | null

hasPassphrase() публичный Метод

Checks if there is a passphrase to use with the certificate
public hasPassphrase ( ) : boolean
Результат boolean

isValidated() публичный Метод

Check if this certificate is validated
public isValidated ( ) : boolean
Результат boolean

serialize() публичный Метод

String representation of object
public serialize ( ) : string
Результат string

unserialize() публичный Метод

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