class ApacheDetector implements DetectorInterface (View source)

Properties

protected Request $request

Methods

__construct(Request $request)

Class constructor.

null|string
detect()

Determine whether this environment matches the expected service environment.

null|string
detectFromServer(string $value)

Detect from the SERVER_SOFTWARE key of the superglobal server array.

null|string
detectFromSPL(string $value)

Detect using the result of the SPL apache_get_version().

null|string
detectFromPHPInfo(string $value)

Detect using PHPInfo.

null|string
detectFromSapiName($sapiName)

Detect using PHP_SAPI/php_sapi_name.

Details

__construct(Request $request)

Class constructor.

Parameters

Request $request

null|string detect()

Determine whether this environment matches the expected service environment.

Returns null if not matched, or the service version if it's matched (empty string if the version is not detected).

Return Value

null|string

See also

DetectorInterface::detect

private null|string detectFromServer(string $value)

Detect from the SERVER_SOFTWARE key of the superglobal server array.

Parameters

string $value

Return Value

null|string

private null|string detectFromSPL(string $value)

Detect using the result of the SPL apache_get_version().

Parameters

string $value

Return Value

null|string

private null|string detectFromPHPInfo(string $value)

Detect using PHPInfo.

Parameters

string $value

Return Value

null|string

private null|string detectFromSapiName($sapiName)

Detect using PHP_SAPI/php_sapi_name.

Parameters

$sapiName

Return Value

null|string