PHP 클래스 Wrep\Notificato\Apns\Certificate

상속: implements Serializable
파일 보기 프로젝트 열기: wrep/notificato 1 사용 예제들

공개 메소드들

메소드 설명
__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 )