SecurityTxt

Implements \AustinHeap\Security\Txt\SecurityTxtInterface

SecurityTxt

link

https://github.com/austinheap/php-security-txt

link

https://packagist.org/packages/austinheap/php-security-txt

link

https://austinheap.github.io/php-security-txt/classes/AustinHeap.Security.Txt.SecurityTxt.html

link

https://securitytext.org/

package

php-security-txt

Methods

Create a new SecurityTxt instance.

__construct(\AustinHeap\Security\Txt\Writer|\AustinHeap\Security\Txt\Reader &$parent = null) : \AustinHeap\Security\Txt\SecurityTxt|\AustinHeap\Security\Txt\Writer|\AustinHeap\Security\Txt\Reader

Add a contact.

addContact(string $contact) : \AustinHeap\Security\Txt\SecurityTxt
inherited

Arguments

$contact

string

Response

\AustinHeap\Security\Txt\SecurityTxt

Add contacts.

addContacts(array $contacts) : \AustinHeap\Security\Txt\SecurityTxt
inherited

Arguments

$contacts

array

Response

\AustinHeap\Security\Txt\SecurityTxt

Disable the comments flag.

disableComments() : \AustinHeap\Security\Txt\SecurityTxt

Disable the debug flag.

disableDebug() : \AustinHeap\Security\Txt\SecurityTxt

Enable the comments flag.

enableComments() : \AustinHeap\Security\Txt\SecurityTxt

Enable the debug flag.

enableDebug() : \AustinHeap\Security\Txt\SecurityTxt

Stub generate function. Must be overridden by inheriting class that implements SecurityTxtInterface.

execute(boolean $test_case = false) : \AustinHeap\Security\Txt\Reader|\AustinHeap\Security\Txt\Writer|null
Throws
\Exception

Arguments

$test_case

boolean

Response

\AustinHeap\Security\Txt\Reader|\AustinHeap\Security\Txt\Writer|null

Get the acknowledgement URL.

getAcknowledgement() : string
inherited

Response

string

Get the comments flag.

getComments() : boolean

Response

boolean

Get the contacts.

getContacts() : array
inherited

Response

array

Get the debug flag.

getDebug() : boolean

Response

boolean

Get the disclosure policy.

getDisclosure() : string
inherited

Response

string

Get the encryption.

getEncryption() : string
inherited

Response

string

Returns the parent object if it exists.

getParent() : \AustinHeap\Security\Txt\Reader|\AustinHeap\Security\Txt\Writer

Returns the parent's class if it exists.

getParentClass() : string

Response

string

Get the text.

getText() : string

Response

string

Determines if a contact exists.

hasContact(string $contact) : boolean
inherited

Arguments

$contact

string

Response

boolean

Determines if an array of contacts exists.

hasContacts(array $contacts) : boolean
inherited

Arguments

$contacts

array

Response

boolean

Determines if the parent object was set.

hasParent() : boolean

Response

boolean

Throws an exception when the inheriting class did not correctly implement SecurityTxtInterface.

overrideMissing(string $function, boolean $test_case = false) : null
Throws
\Exception

Arguments

$function

string

$test_case

boolean

Response

null

Remove a contact.

removeContact(string $contact) : \AustinHeap\Security\Txt\SecurityTxt
inherited

Arguments

$contact

string

Response

\AustinHeap\Security\Txt\SecurityTxt

Remove contacts.

removeContacts(array $contacts) : \AustinHeap\Security\Txt\SecurityTxt
inherited

Arguments

$contacts

array

Response

\AustinHeap\Security\Txt\SecurityTxt

Stub reset function. Must be overridden by inheriting class that implements SecurityTxtInterface.

reset(boolean $test_case = false) : \AustinHeap\Security\Txt\Reader|\AustinHeap\Security\Txt\Writer|null
Throws
\Exception

Arguments

$test_case

boolean

Response

\AustinHeap\Security\Txt\Reader|\AustinHeap\Security\Txt\Writer|null

Set the acknowledgement URL.

setAcknowledgement(string $acknowledgement) : \AustinHeap\Security\Txt\SecurityTxt
inherited

Arguments

$acknowledgement

string

Response

\AustinHeap\Security\Txt\SecurityTxt

Set the comments flag.

setComments(string $comments) : \AustinHeap\Security\Txt\SecurityTxt

Arguments

$comments

string

Response

\AustinHeap\Security\Txt\SecurityTxt

Set the contacts.

setContacts(array $contacts) : \AustinHeap\Security\Txt\SecurityTxt
inherited

Arguments

$contacts

array

Response

\AustinHeap\Security\Txt\SecurityTxt

Set the debug flag.

setDebug(boolean $debug) : \AustinHeap\Security\Txt\SecurityTxt

Arguments

$debug

boolean

Response

\AustinHeap\Security\Txt\SecurityTxt

Set the disclosure policy.

setDisclosure(string $disclosure) : \AustinHeap\Security\Txt\SecurityTxt
inherited

Arguments

$disclosure

string

Response

\AustinHeap\Security\Txt\SecurityTxt

Set the encryption.

setEncryption(string $encryption) : \AustinHeap\Security\Txt\SecurityTxt
inherited

Arguments

$encryption

string

Response

\AustinHeap\Security\Txt\SecurityTxt

Set the text.

setText(string $text) : \AustinHeap\Security\Txt\SecurityTxt

Arguments

$text

string

Response

\AustinHeap\Security\Txt\SecurityTxt

Validates a contact.

validContact(string $contact) : boolean
inherited
string

string $contact

Arguments

$contact

string

Response

boolean

Validates an array of contacts.

validContacts(array $contacts, boolean $use_keys = false) : boolean
inherited

Arguments

$contacts

array

$use_keys

boolean

Response

boolean

Determines if disclosure is valid.

validDisclosure(string $disclosure) : boolean
inherited

Arguments

$disclosure

string

Response

boolean

Determines if encryption is valid.

validEncryption(string $encryption) : boolean
inherited

Arguments

$encryption

string

Response

boolean

Constants

Internal version number.

VERSION
var

Properties

Internal parent object.

parent : \AustinHeap\Security\Txt\Writer|\AustinHeap\Security\Txt\Reader

Internal Writer object.

writer : \AustinHeap\Security\Txt\Writer

Internal Reader object.

reader : \AustinHeap\Security\Txt\Reader

Internal text cache.

text : string
var

Type(s)

string

Enable debug output.

debug : boolean
var

Type(s)

boolean

Enable built-in comments.

comments : boolean
var

Type(s)

boolean

The security contact(s).

contacts : array
inherited
var

Type(s)

array

The PGP key file URL.

encryption : string
inherited
var

Type(s)

string

The disclosure policy.

disclosure : string
inherited
var

Type(s)

string

The acknowledgement URL.

acknowledgement : string
inherited
var

Type(s)

string