SetaPDF_Signer_X509_Collection Class representing a collection of X509 certificates.

File: /SetaPDF v2/Signer/X509/Collection.php

Class hierarchy

Implements

Summary

Properties


Methods

__construct()

public SetaPDF_Signer_X509_Collection::__construct (
[ $certificates = null ]
)

The constructor.

Parameters
$certificates
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception

_getCollectionItems()

Get all items which are not direct certificates but implement the CollectionInterface.

add()

public SetaPDF_Signer_X509_Collection::add (
$certificates
):

Add a certificate, certificates or collections.

Parameters
$certificates
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception

addFromFile()

Add a certificate from a path.

Parameters
$path
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception

contains()

count()

Count all items.

Notice: that this method collects ALL items to count only unique elements.

findByCallback()

Find all certificates by a callback.

Parameters
$callback
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception

findByIssuer()

public SetaPDF_Signer_X509_Collection::findByIssuer (
$issuer [, $fullMatch = false ]
):

Parameters
$issuer
 
$fullMatch

Whether only a substring matched or the whole subject should be compared.

Exceptions

Throws SetaPDF_Signer_Asn1_Exception

Throws SetaPDF_Signer_Exception

findBySubject()

public SetaPDF_Signer_X509_Collection::findBySubject (
$subject [, $fullMatch = false ]
):

Parameters
$subject
 
$fullMatch

Whether only a substring matched or the whole subject should be compared.

Exceptions

Throws SetaPDF_Signer_Asn1_Exception

findByValidAt()

public SetaPDF_Signer_X509_Collection::findByValidAt (
DateTimeInterface $dateTime [, DateTimeZone|null $timeZone = null ]
):

Parameters
$dateTime : DateTimeInterface
 
$timeZone : DateTimeZone|null
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception

Throws Exception

getAll()

Get all certificates.

getBySerialNumber()

Parameters
$serialNumber

The hex encoded serial number.

Exceptions

Throws SetaPDF_Signer_Exception

getBySubjectKeyIdentifier()

public SetaPDF_Signer_X509_Collection::getBySubjectKeyIdentifier (
$subjectKeyIdentifier
):

Parameters
$subjectKeyIdentifier
 
Exceptions

Throws SetaPDF_Signer_Asn1_Exception