class DeprecationMessage in Upgrade Status 8.3
Same name and namespace in other branches
- 8.2 src/DeprecationMessage.php \Drupal\upgrade_status\DeprecationMessage
A value object containing a deprecation message with some metadata.
Hierarchy
- class \Drupal\upgrade_status\DeprecationMessage
Expanded class hierarchy of DeprecationMessage
File
- src/
DeprecationMessage.php, line 10
Namespace
Drupal\upgrade_statusView source
class DeprecationMessage {
/**
* The message.
*
* @var string
*/
protected $message;
/**
* The line associated to the deprecation message.
*
* @var int
*/
protected $line;
/**
* The file related to the deprecation message.
*
* @var string
*/
protected $file;
/**
* Constructs a new deprecation message.
*
* @param string $message
* The message.
* @param string $file
* The file related to the deprecation message.
* @param int $line
* The line associated to the deprecation message.
*/
public function __construct(string $message, string $file = '', int $line = 0) {
$this->message = $message;
$this->file = $file;
$this->line = $line;
}
/**
* Gets the message.
*
* @return string
*/
public function getMessage() : string {
return $this->message;
}
/**
* Gets the file.
*
* @return string
*/
public function getFile() : string {
return $this->file;
}
/**
* Gets the line.
*
* @return int
*/
public function getLine() : int {
return $this->line;
}
/**
* Sets the line value.
*
* @param int $line
* The line associated to the deprecation message.
*/
public function setLine(int $line) {
$this->line = $line;
}
/**
* Sets the file value.
*
* @param string $file
* The file related to the deprecation message.
*/
public function setFile(string $file) {
$this->file = $file;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeprecationMessage:: |
protected | property | The file related to the deprecation message. | |
DeprecationMessage:: |
protected | property | The line associated to the deprecation message. | |
DeprecationMessage:: |
protected | property | The message. | |
DeprecationMessage:: |
public | function | Gets the file. | |
DeprecationMessage:: |
public | function | Gets the line. | |
DeprecationMessage:: |
public | function | Gets the message. | |
DeprecationMessage:: |
public | function | Sets the file value. | |
DeprecationMessage:: |
public | function | Sets the line value. | |
DeprecationMessage:: |
public | function | Constructs a new deprecation message. |