Update website
This commit is contained in:
parent
4413528994
commit
1d90fbf296
6865 changed files with 1091082 additions and 0 deletions
59
vendor/doctrine/rst-parser/lib/Nodes/TitleNode.php
vendored
Normal file
59
vendor/doctrine/rst-parser/lib/Nodes/TitleNode.php
vendored
Normal file
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\RST\Nodes;
|
||||
|
||||
use Doctrine\RST\Environment;
|
||||
|
||||
class TitleNode extends Node
|
||||
{
|
||||
/** @var SpanNode */
|
||||
protected $value;
|
||||
|
||||
/** @var int */
|
||||
private $level;
|
||||
|
||||
/** @var string */
|
||||
protected $token;
|
||||
|
||||
/** @var string */
|
||||
private $id;
|
||||
|
||||
/** @var string */
|
||||
private $target = '';
|
||||
|
||||
public function __construct(Node $value, int $level, string $token)
|
||||
{
|
||||
parent::__construct($value);
|
||||
|
||||
$this->level = $level;
|
||||
$this->token = $token;
|
||||
$this->id = Environment::slugify($this->value->getText());
|
||||
}
|
||||
|
||||
public function getValue(): SpanNode
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
public function getLevel(): int
|
||||
{
|
||||
return $this->level;
|
||||
}
|
||||
|
||||
public function setTarget(string $target): void
|
||||
{
|
||||
$this->target = $target;
|
||||
}
|
||||
|
||||
public function getTarget(): string
|
||||
{
|
||||
return $this->target;
|
||||
}
|
||||
|
||||
public function getId(): string
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue