Update website
This commit is contained in:
parent
4413528994
commit
1d90fbf296
6865 changed files with 1091082 additions and 0 deletions
51
vendor/doctrine/rst-parser/lib/Span/SpanToken.php
vendored
Normal file
51
vendor/doctrine/rst-parser/lib/Span/SpanToken.php
vendored
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\RST\Span;
|
||||
|
||||
final class SpanToken
|
||||
{
|
||||
public const TYPE_LITERAL = 'literal';
|
||||
public const TYPE_REFERENCE = 'reference';
|
||||
public const TYPE_LINK = 'link';
|
||||
|
||||
/** @var string */
|
||||
private $type;
|
||||
|
||||
/** @var string */
|
||||
private $id;
|
||||
|
||||
/** @var string[] */
|
||||
private $token;
|
||||
|
||||
/** @param string[] $token */
|
||||
public function __construct(string $type, string $id, array $token)
|
||||
{
|
||||
$this->type = $type;
|
||||
$this->id = $id;
|
||||
$this->token = $token;
|
||||
$this->token['type'] = $type;
|
||||
}
|
||||
|
||||
public function getType(): string
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
public function getId(): string
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function get(string $key): string
|
||||
{
|
||||
return $this->token[$key] ?? '';
|
||||
}
|
||||
|
||||
/** @return string[] */
|
||||
public function getTokenData(): array
|
||||
{
|
||||
return $this->token;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue