class Test7Config in Rocket.Chat 8
Same name and namespace in other branches
- 8.2 modules/rocket_chat_api/src/RocketChat/TestConfig.class.inc \Drupal\rocket_chat_api\RocketChat\Test7Config
Class Test7Config For Testing.
@package Drupal\rocket_chat_api\RocketChat
Hierarchy
- class \Drupal\rocket_chat_api\RocketChat\Drupal8Config implements ContainerInjectionInterface, RocketChatConfigInterface
- class \Drupal\rocket_chat_api\RocketChat\Test7Config
Expanded class hierarchy of Test7Config
File
- modules/
rocket_chat_api/ src/ RocketChat/ TestConfig.class.inc, line 17
Namespace
Drupal\rocket_chat_api\RocketChatView source
class Test7Config extends Drupal8Config {
/**
* User Id.
*
* @var string
* Id.
*/
private $userId;
/**
* User Token.
*
* @var string
* Secret.
*/
private $userToken;
/**
* Rocket chat Server.
*
* @var string
* Server.
*/
private $server = "http://127.0.0.1:3000";
/**
* {@inheritdoc}
*/
public function getElement($elementName, $default = NULL) {
switch ($elementName) {
case "rocket_chat_uid":
return $this->userId;
case "rocket_chat_uit":
return $this->userToken;
case "rocket_chat_url":
return $this->server;
default:
return $default;
}
}
/**
* {@inheritdoc}
*/
public function setElement($elementName, $newValue) {
switch ($elementName) {
case "rocket_chat_uid":
$this->userId = $newValue;
break;
case "rocket_chat_uit":
$this->userToken = $newValue;
break;
case "rocket_chat_url":
$this->server = $newValue;
break;
default:
fwrite(STDERR, "TEST SET [{$elementName}=>{$newValue}]\n");
}
}
/**
* {@inheritdoc}
*/
public function isDebug() {
return FALSE;
}
/**
* {@inheritdoc}
*/
public function notify($message, $type) {
return fwrite(STDERR, "Message [{$type}=>{$message}]\n");
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Drupal8Config:: |
protected | property | The config factory. | |
Drupal8Config:: |
protected | property | ||
Drupal8Config:: |
protected | property | ||
Drupal8Config:: |
public static | function |
Instantiates a new instance of this class. Overrides ContainerInjectionInterface:: |
|
Drupal8Config:: |
public | function |
Get a function pointer to the function to use for JsonDecodeing. Overrides RocketChatConfigInterface:: |
|
Drupal8Config:: |
public | function | Constructs a \Drupal\system\ConfigFormBase object. | |
Test7Config:: |
private | property | Rocket chat Server. | |
Test7Config:: |
private | property | User Id. | |
Test7Config:: |
private | property | User Token. | |
Test7Config:: |
public | function |
Get a RocketChatConfigInterface Element. Overrides Drupal8Config:: |
|
Test7Config:: |
public | function |
Is this a Debug / verbose Run. Overrides Drupal8Config:: |
|
Test7Config:: |
public | function |
Notify the backend. Overrides Drupal8Config:: |
|
Test7Config:: |
public | function |
Set an Element in the RocketChatConfigInterface. Overrides Drupal8Config:: |