Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
|null $lineNumber
*/
public function __construct(string $commentText = '', ?int $lineNumber = null)
{
$this->commentText = $commentText;
$this->setPosition($lineNumber);
}
public function getComment(): string
{
return $this->commentText;
}
public function setComment(string $commentText): void
{
$this->commentText = $commentText;
}
/**
* @return non-empty-string
*/
public function render(OutputFormat $outputFormat): string
{
return '/*' . $this->commentText . '*/';
}
/**
* @return array|null>
*
* @internal
*/
public function getArrayRepresentation(): array
{
return [
'class' => $this->getShortClassName(),
// "contents" is the term used in the W3C specs:
// https://www.w3.org/TR/CSS22/syndata.html#comments
'contents' => $this->commentText,
];
}
}