ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilWACDummyCookie Class Reference

Class ilWACDummyCookie. More...

+ Inheritance diagram for ilWACDummyCookie:
+ Collaboration diagram for ilWACDummyCookie:

Public Member Functions

 set ($name, $value="", $expire=0, $path="", $domain="", $secure=false, $httponly=false)
 
 get ($name)
 
 exists ($name)
 
 getAll ()
 

Static Public Member Functions

static clear ()
 

Static Protected Attributes

static $expires = array()
 
static $values = array()
 

Detailed Description

Member Function Documentation

◆ clear()

static ilWACDummyCookie::clear ( )
static

Definition at line 79 of file class.ilWACDummyCookie.php.

References array.

Referenced by ilWACTokenTest\testCookieGeneration(), and ilWACTokenTest\testFolderToken().

79  {
80  self::$expires = array();
81  self::$values = array();
82  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ exists()

ilWACDummyCookie::exists (   $name)
Parameters
$name
Returns
bool

Implements ilWACCookieInterface.

Definition at line 55 of file class.ilWACDummyCookie.php.

References time.

Referenced by get(), and getAll().

55  {
56  if (!isset(static::$expires[$name]) || (static::$expires[$name] !== 0 && static::$expires[$name] <= time())) {
57  return false;
58  }
59 
60  return isset(static::$values[$name]);
61  }
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the caller graph for this function:

◆ get()

ilWACDummyCookie::get (   $name)
Parameters
$name
Returns
mixed

Implements ilWACCookieInterface.

Definition at line 42 of file class.ilWACDummyCookie.php.

References exists().

42  {
43  if (!$this->exists($name)) {
44  return false;
45  }
46 
47  return static::$values[$name];
48  }
+ Here is the call graph for this function:

◆ getAll()

ilWACDummyCookie::getAll ( )
Returns
array

Implements ilWACCookieInterface.

Definition at line 67 of file class.ilWACDummyCookie.php.

References array, and exists().

67  {
68  $return = array();
69  foreach (self::$values as $key => $value) {
70  if ($this->exists($key)) {
71  $return[$key] = $value;
72  }
73  }
74 
75  return $return;
76  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ set()

ilWACDummyCookie::set (   $name,
  $value = "",
  $expire = 0,
  $path = "",
  $domain = "",
  $secure = false,
  $httponly = false 
)
Parameters
$name
string$value
int$expire
string$path
string$domain
bool$secure
bool$httponly
Returns
bool

Implements ilWACCookieInterface.

Definition at line 31 of file class.ilWACDummyCookie.php.

References $_COOKIE.

31  {
32  static::$expires[$name] = $expire;
33  static::$values[$name] = $value;
34  $_COOKIE[$name] = $value;
35  }
$_COOKIE['ilClientId']
Definition: BPMN2Parser.php:15

Field Documentation

◆ $expires

ilWACDummyCookie::$expires = array()
staticprotected

Definition at line 14 of file class.ilWACDummyCookie.php.

◆ $values

ilWACDummyCookie::$values = array()
staticprotected

Definition at line 18 of file class.ilWACDummyCookie.php.


The documentation for this class was generated from the following file: