class SessionCheck implements EnvironmentCheck (View source)

Check that a given URL does not generate a session.

Traits

Simple helper for env checks which require HTTP clients.

Properties

public Client $client

Client for making requests, set vi Injector.

from  Fetcher
protected string $url

Absolute URL for requests.

from  Fetcher

Methods

public
setURL(string $url)

Set URL for requests.

from  Fetcher
public
string
getURL()

Getter for URL

from  Fetcher
public
__construct(string $url = '')

Set up check with URL

public
array
check()

Check that the response for URL does not create a session

public
string|null
getCookie(ResponseInterface $response)

Get PHPSESSID or SECSESSID cookie set from the response if it exists.

Details

Fetcher setURL(string $url)

Set URL for requests.

Parameters

string $url

Relative URL

Return Value

Fetcher

string getURL()

Getter for URL

Return Value

string

__construct(string $url = '')

Set up check with URL

Parameters

string $url

The route, excluding the domain

array check()

Check that the response for URL does not create a session

Return Value

array

Result with 'status' and 'message' keys.

Status is EnvironmentCheck::ERROR, EnvironmentCheck::WARNING, or EnvironmentCheck::OK.

string|null getCookie(ResponseInterface $response)

Get PHPSESSID or SECSESSID cookie set from the response if it exists.

Parameters

ResponseInterface $response

Return Value

string|null

Cookie contents or null if it doesn't exist