Documentation

Misc
in package

Utility functions.

Table of Contents

removeEmptyStrings()  : array<string|int, mixed>
Recursively removes all the keys containing an empty string as value.
verify()  : string
Looks for a Certificate Authority file in the CA folder that matches the host and return the values for the verify option to its full path.

Methods

removeEmptyStrings()

Recursively removes all the keys containing an empty string as value.

public static removeEmptyStrings(array<string|int, mixed> $array) : array<string|int, mixed>

Also removes empty arrays in the process.

Parameters
$array : array<string|int, mixed>

The array to filter

Return values
array<string|int, mixed>

the filtered array

verify()

Looks for a Certificate Authority file in the CA folder that matches the host and return the values for the verify option to its full path.

public static verify(string $url, string $caDir) : string

If no specific file regarding a host is found, uses curl-ca-bundle.crt by default.

Parameters
$url : string

The host

$caDir : string

The CA folder

Return values
string

The Certificate Authority file

Search results