class CookieFactory

Properties

protected string $prefix <p>The prefix for the cookie names.</p>
protected string $path <p>A path scope for the cookies.</p>
protected string $domain <p>A domain scope for the cookies.</p>
protected bool $secure <p>Whether the cookie(s) can be requested only over HTTPS.</p>

Methods

__construct(Application $app)

No description

SetCookie
make(string $name, string $value = null, int $maxAge = null)

<p>Make a new cookie instance.</p>

SetCookie
expire(string $name)

<p>Make an expired cookie instance.</p>

string
getName(string $name)

<p>Get a cookie name.</p>

Details

__construct(Application $app)

Parameters

Application $app

SetCookie make(string $name, string $value = null, int $maxAge = null)

<p>Make a new cookie instance.</p>

<p>This method returns a cookie instance for use with the Set-Cookie HTTP header. It will be pre-configured according to Flarum's base URL and protocol.</p>

Parameters

string $name
string $value
int $maxAge

Return Value

SetCookie

SetCookie expire(string $name)

<p>Make an expired cookie instance.</p>

Parameters

string $name

Return Value

SetCookie

string getName(string $name)

<p>Get a cookie name.</p>

Parameters

string $name

Return Value

string