BLUE
PHP 7.4.33
Path:
/var/www/multi-event-cfp.bitkit.dk/httpdocs/vendor/phpdocumentor/reflection-docblock/src/DocBlock
Run
Logout
Edit File
Size: 3.45 KB
Close
/var/www/multi-event-cfp.bitkit.dk/httpdocs/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php
Text
Base64
<?php declare(strict_types=1); /** * This file is part of phpDocumentor. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\DocBlock; use phpDocumentor\Reflection\DocBlock\Tags\Formatter; use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter; use function vsprintf; /** * Object representing to description for a DocBlock. * * A Description object can consist of plain text but can also include tags. A Description Formatter can then combine * a body template with sprintf-style placeholders together with formatted tags in order to reconstitute a complete * description text using the format that you would prefer. * * Because parsing a Description text can be a verbose process this is handled by the {@see DescriptionFactory}. It is * thus recommended to use that to create a Description object, like this: * * $description = $descriptionFactory->create('This is a {@see Description}', $context); * * The description factory will interpret the given body and create a body template and list of tags from them, and pass * that onto the constructor if this class. * * > The $context variable is a class of type {@see \phpDocumentor\Reflection\Types\Context} and contains the namespace * > and the namespace aliases that apply to this DocBlock. These are used by the Factory to resolve and expand partial * > type names and FQSENs. * * If you do not want to use the DescriptionFactory you can pass a body template and tag listing like this: * * $description = new Description( * 'This is a %1$s', * [ new See(new Fqsen('\phpDocumentor\Reflection\DocBlock\Description')) ] * ); * * It is generally recommended to use the Factory as that will also apply escaping rules, while the Description object * is mainly responsible for rendering. * * @see DescriptionFactory to create a new Description. * @see Description\Formatter for the formatting of the body and tags. */ class Description { /** @var string */ private $bodyTemplate; /** @var Tag[] */ private $tags; /** * Initializes a Description with its body (template) and a listing of the tags used in the body template. * * @param Tag[] $tags */ public function __construct(string $bodyTemplate, array $tags = []) { $this->bodyTemplate = $bodyTemplate; $this->tags = $tags; } /** * Returns the body template. */ public function getBodyTemplate(): string { return $this->bodyTemplate; } /** * Returns the tags for this DocBlock. * * @return Tag[] */ public function getTags(): array { return $this->tags; } /** * Renders this description as a string where the provided formatter will format the tags in the expected string * format. */ public function render(?Formatter $formatter = null): string { if ($formatter === null) { $formatter = new PassthroughFormatter(); } $tags = []; foreach ($this->tags as $tag) { $tags[] = '{' . $formatter->format($tag) . '}'; } return vsprintf($this->bodyTemplate, $tags); } /** * Returns a plain string representation of this description. */ public function __toString(): string { return $this->render(); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Tags
DIR
-
drwxrwxr-x
2021-10-19 17:43:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Description.php
3.45 KB
lrw-rw-r--
2021-10-19 17:43:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DescriptionFactory.php
6.54 KB
lrw-rw-r--
2021-10-19 17:43:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ExampleFinder.php
4.59 KB
lrw-rw-r--
2021-10-19 17:43:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Serializer.php
4.83 KB
lrw-rw-r--
2021-10-19 17:43:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
StandardTagFactory.php
12.32 KB
lrw-rw-r--
2021-10-19 17:43:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Tag.php
659 B
lrw-rw-r--
2021-10-19 17:43:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TagFactory.php
3.62 KB
lrw-rw-r--
2021-10-19 17:43:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).