class Stroopwafel in Bakery Single Sign-On System 8.2
Hierarchy
- class \Drupal\bakery\Cookies\Stroopwafel implements CookieInterface, RemoteCookieInterface
Expanded class hierarchy of Stroopwafel
4 files declare their use of Stroopwafel
- BakeryUserHooks.php in src/
BakeryUserHooks.php - ChildController.php in src/
Controller/ ChildController.php - KitchenTest.php in tests/
src/ Unit/ KitchenTest.php - StroopwafelTest.php in tests/
src/ Unit/ Cookies/ StroopwafelTest.php
File
- src/
Cookies/ Stroopwafel.php, line 5
Namespace
Drupal\bakery\CookiesView source
class Stroopwafel implements CookieInterface, RemoteCookieInterface {
private $uid;
private $data;
public final function __construct($uid, $data) {
$this->uid = $uid;
$this->data = $data;
}
/**
* {@inheritDoc}
*/
public static function fromData(array $data) {
return new static($data['uid'], unserialize($data['data']));
}
/**
* {@inheritDoc}
*/
public function toData() : array {
return [
'uid' => $this->uid,
'category' => 'account',
'data' => serialize($this->data),
];
}
/**
* {@inheritDoc}
*/
public static function getName() : string {
return 'stroopwafel';
}
/**
* {@inheritDoc}
*/
public function getPath() {
return 'bakery/update';
}
public function getUid() {
return $this->uid;
}
public function getData() {
return $this->data;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Stroopwafel:: |
private | property | ||
Stroopwafel:: |
private | property | ||
Stroopwafel:: |
public static | function |
Create from data stored in a cookie. Overrides CookieInterface:: |
|
Stroopwafel:: |
public | function | ||
Stroopwafel:: |
public static | function |
Get the cookie name/type. Overrides CookieInterface:: |
|
Stroopwafel:: |
public | function |
Gets the remote path to deliver cookies too. Overrides RemoteCookieInterface:: |
|
Stroopwafel:: |
public | function | ||
Stroopwafel:: |
public | function |
Convert the data into an array to be stored into a cookie. Overrides CookieInterface:: |
|
Stroopwafel:: |
final public | function |