class \mpf\web\Cookie

class \mpf\web\Cookie

-no description found-

Attributes
private static \mpf\web\Cookie $_instance

-no description found-

public null $domain

Domain used for cookie.

public bool $httpOnly = true

Available only for HTTTP

public bool $secured = false

Record if value should be secured or not.

public bool $hashed = true

Use hash to check if the value was altered.

public string $salt = "123132#!@#3424#@$#25543"

Salt used to generate verification hash

public int $days = 30

Default days for a cookie value

public int $hours

Default hours for a cookie value

public int $minutes

Default minutes for a cookie value

Methods

public static \mpf\web\Cookie get ()

-no description found-

public mixed value (string $key)

  • $key

    -no description found-

Get cookie value for selected key.

public bool set (string $key, mixed $value, null $days = null, null $hours = null, null $minutes = null)

  • $key

    -no description found-

  • $value

    -no description found-

  • $days

    -no description found-

  • $hours

    -no description found-

  • $minutes

    -no description found-

Set a cookie using current parameters.

public mixed delete (mixed $key)

  • $key

    -no description found-

Delete a single cookie value

public bool exists (mixed $key)

  • $key

    -no description found-

Checks if a key exists in cookies.