class Gingerbread in Bakery Single Sign-On System 8.2
Hierarchy
- class \Drupal\bakery\Cookies\Gingerbread implements CookieInterface, RemoteCookieInterface
Expanded class hierarchy of Gingerbread
6 files declare their use of Gingerbread
- BakeryService.php in src/
BakeryService.php - Services used in bakery SSO functions.
- GingerbreadTest.php in tests/
src/ Unit/ Cookies/ GingerbreadTest.php - KitchenTest.php in tests/
src/ Unit/ KitchenTest.php - MainController.php in src/
Controller/ MainController.php - Router call back functions for bakery SSO functions.
- MainSitePagesTest.php in tests/
src/ Functional/ MainSitePagesTest.php
File
- src/
Cookies/ Gingerbread.php, line 5
Namespace
Drupal\bakery\CookiesView source
class Gingerbread implements CookieInterface, RemoteCookieInterface {
private $name;
private $or_email;
private $child;
private $uid;
public final function __construct($name, $or_email, $child, $uid) {
$this->name = $name;
$this->or_email = $or_email;
$this->child = $child;
$this->uid = $uid;
}
/**
* {@inheritDoc}
*/
public static function fromData(array $data) {
return new static($data['name'], $data['or_email'], $data['slave'], $data['uid']);
}
/**
* {@inheritDoc}
*/
public function toData() : array {
return [
'name' => $this->name,
'or_email' => $this->or_email,
// Match slave property are set on the main site.
'slave' => $this->child,
'uid' => $this->uid,
];
}
/**
* {@inheritDoc}
*/
public static function getName() : string {
return 'gingerbread';
}
/**
* {@inheritDoc}
*/
public function getPath() {
return 'bakery/create';
}
public function getAccountName() {
return $this->name;
}
public function getOrEmail() {
return $this->or_email;
}
public function getChild() {
return $this->child;
}
public function getChildUid() {
return $this->uid;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Gingerbread:: |
private | property | ||
Gingerbread:: |
private | property | ||
Gingerbread:: |
private | property | ||
Gingerbread:: |
private | property | ||
Gingerbread:: |
public static | function |
Create from data stored in a cookie. Overrides CookieInterface:: |
|
Gingerbread:: |
public | function | ||
Gingerbread:: |
public | function | ||
Gingerbread:: |
public | function | ||
Gingerbread:: |
public static | function |
Get the cookie name/type. Overrides CookieInterface:: |
|
Gingerbread:: |
public | function | ||
Gingerbread:: |
public | function |
Gets the remote path to deliver cookies too. Overrides RemoteCookieInterface:: |
|
Gingerbread:: |
public | function |
Convert the data into an array to be stored into a cookie. Overrides CookieInterface:: |
|
Gingerbread:: |
final public | function |