Update website
This commit is contained in:
parent
4413528994
commit
1d90fbf296
6865 changed files with 1091082 additions and 0 deletions
22
vendor/doctrine/rst-parser/lib/Formats/Format.php
vendored
Normal file
22
vendor/doctrine/rst-parser/lib/Formats/Format.php
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\RST\Formats;
|
||||
|
||||
use Doctrine\RST\Directives\Directive;
|
||||
use Doctrine\RST\Renderers\NodeRendererFactory;
|
||||
|
||||
interface Format
|
||||
{
|
||||
public const HTML = 'html';
|
||||
public const LATEX = 'tex';
|
||||
|
||||
public function getFileExtension(): string;
|
||||
|
||||
/** @return Directive[] */
|
||||
public function getDirectives(): array;
|
||||
|
||||
/** @return NodeRendererFactory[] */
|
||||
public function getNodeRendererFactories(): array;
|
||||
}
|
50
vendor/doctrine/rst-parser/lib/Formats/InternalFormat.php
vendored
Normal file
50
vendor/doctrine/rst-parser/lib/Formats/InternalFormat.php
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\RST\Formats;
|
||||
|
||||
use Doctrine\RST\Directives\Directive;
|
||||
use Doctrine\RST\Renderers\NodeRendererFactory;
|
||||
|
||||
final class InternalFormat implements Format
|
||||
{
|
||||
/** @var Format */
|
||||
private $format;
|
||||
|
||||
/** @var Directive[]|null */
|
||||
private $directives;
|
||||
|
||||
/** @var NodeRendererFactory[]|null */
|
||||
private $nodeRendererFactories;
|
||||
|
||||
public function __construct(Format $format)
|
||||
{
|
||||
$this->format = $format;
|
||||
}
|
||||
|
||||
public function getFileExtension(): string
|
||||
{
|
||||
return $this->format->getFileExtension();
|
||||
}
|
||||
|
||||
/** @return Directive[] */
|
||||
public function getDirectives(): array
|
||||
{
|
||||
if ($this->directives === null) {
|
||||
$this->directives = $this->format->getDirectives();
|
||||
}
|
||||
|
||||
return $this->directives;
|
||||
}
|
||||
|
||||
/** @return NodeRendererFactory[] */
|
||||
public function getNodeRendererFactories(): array
|
||||
{
|
||||
if ($this->nodeRendererFactories === null) {
|
||||
$this->nodeRendererFactories = $this->format->getNodeRendererFactories();
|
||||
}
|
||||
|
||||
return $this->nodeRendererFactories;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue