doc2rst documentation
About
Doc2rst generates reStructuredText from PHP-source trees. The generated reStructuredText than again can act as a source for Sphinx, the versatile tool that builds -amongst others- html.
Doc2rst is written in PHP.
Source code: https://github.com/bhenk/doc2rst
Quick Install
Requirements
Minimum (tested) PHP-version is 8.1.
Project structure
Doc2rst has several configuration options but in general expects a project structure that consists of directories in a project home folder. The application_root is where the php-source code is. The doc_root is where the documentation on the project goes. A direct child of the application_root folder is the vendor_directory. Usually the name of this folder is also the start of the namespace sequence. The doc_root has a sub folder where the generated API-documents go: the api_directory.
{project-home} |
| {application_root} |
| | {vendor_directory} |
| | {package}
| | {...}
| {doc_root} |
| {api_directory}
The vendor_directory can have as many packages or sub folders as you like. All packages will have their own entry in the table of contents on the start page of the api-documentation.
Caution
Other project-structures may or may not work for doc2rst. They simply aren’t tested.
Installing doc2rst as PHAR
Download the latest version of doc2rst as a PHAR-file from github and preferably place it in the root folder, aka your project home. See instructions on running the doc2rst phar on the next page.
Installing doc2rst with composer
As you probably only need doc2rst during development you can add the –dev option to the composer command:
composer require --dev bhenk/doc2rst
See instructions on running doc2rst from code on the next page.
Running doc2rst
Doc2rst has two modes of running, quickstart, that will initiate configuration files in the doc_root folder, and run, do the generation of reStructuredText. It is most convenient to start with a quickstart run, it will do best guesses on the structure of your project and installs configuration files in your doc_root folder in order for you to inspect and correct.
Quickstart
The next instructions assume that your documentation folder is called docs and that it is situated in your project root folder.
Quickstart with doc2rst.phar in your project-folder.
Open a terminal in your project folder and issue the following command:
$ ./doc2rst.phar -q ./docs
Quickstart with bhenk\doc2rst as require-dev in composer.
Execute following code:
<?php
use bhenk\doc2rst\process\ProcessManager;
$autoload = "{path/to/your/vendor/autoload}"
require_once $autoload;
$process = new ProcessManager("path/to/docs");
$process->quickStart();
See also ProcessManager.
After running quickstart successfully, doc2rst will have left 3 files in your doc_root folder:
d2r-conf.php - Run configuration
d2r-order.php - Layout of PHPDocComments
d2r-styles.txt - css-classes etc.
Run configuration
A detailed overview of run configuration options is given in the RC-cases enum. For now only a few options are of importance. Check d2r-conf.php in doc_root and correct or set at least:
- application_root - absolute path to your source
Example: /home/project/src
- vendor_directory - absolute path to where your namespace begins
Example /home/project/src/Acme
- bootstrap_file - absolute path to your bootstrap file
Example: /home/project/docs/bootstrap.php The bootstrap file is only needed when running from doc2rst.phar.
- doc_root - absolute path to your documentation folder
You gave it as an argument when running quickstart. Example: /home/project/docs
- api_directory - absolute path to the folder for API-documentation
Example: /home/project/docs/api
That’s it. You can now try and run doc2rst for real.
Run doc2rst
After setting run configuration options in d2r-conf.php you can now run doc2rst in run-mode. In this mode, doc2rst generates the reStructuredText files and mimics the source folder in the docs/api folder.
The next instructions assume that your documentation folder is called docs and that it is situated in your project root folder.
Run doc2rst.phar in your project-folder.
In a terminal issue the following command:
$ ./doc2rst.phar -r ./docs
Run with bhenk\doc2rst as require-dev
$process = new ProcessManager("path/to/docs");
$process->run();
Doc2rst will generate the reStructuredText files in your api_directory. Run Sphinx to complete the transformation to html-pages.
see also
Configuration
d2r-conf.php
The run configuration file is set up as an array. You can find the d2r-conf.php in your doc_root folder after running quickstart. Keys in the array correspond to the names of enum cases in the UnitEnum RC.
Example d2r-conf.php:
<?php
return array(
'application_root' => '/abs/path/to/project/src',
'vendor_directory' => '/abs/path/to/project/src/Acme',
'bootstrap_file' => '/abs/path/to/project/docs/bootstrap.php',
'doc_root' => '/abs/path/to/project/docs',
'api_directory' => '/abs/path/to/project/docs/api',
'api_docs_title' => 'api-docs',
'show_visibility' => ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED,
'excludes' =>
array(
"Acme\package04",
"Acme\package01\package02\NotInDocsClass.php"
),
'log_level' => 200,
'toctree_max_depth' => 0,
'toctree_titles_only' => true,
'show_class_contents' => true,
'user_provided_links' =>
array(
"Psr\Container" => "https://www.php-fig.org/psr/psr-11/"
),
'link_to_sources' => false,
'link_to_search_engine' => true,
'download_file_ext' =>
array(
'.txt',
'.csv',
'.js',
'.sql',
),
'show_datestamp' => true,
);
See RC for a detailed discussion of options.
d2r-order.php
d2r-order.php determines the layout of your PHPDoc comments in the final documentation. You can find the d2r-order.php in your doc_root folder after running quickstart. Keys in the array are names of tags and names of elements of a PhpDocComment.
Example d2r-order.php:
<?php
/**
* Gives the order of elements in DocComments.
*/
return [
"@api" => "",
"@deprecated" => "warning",
"@internal" => "danger",
"@todo" => "admonition",
"@generated" => "",
"summary" => "",
"description" => "",
"@inheritdoc" => "admonition",
"@since" => "",
"unknown_tags" => "",
"@uses" => "",
"@link" => "",
"@see" => "admonition see also",
"@package" => "",
"@version" => "",
"@author" => "",
"@copyright" => "",
"@license" => "",
"@method" => "",
"@var" => "",
"signature" => "",
"@param" => "",
"@return" => "",
"@throws" => "",
];
As said before, the order of the elements in the final documentation is determined by the order in which they appear in d2r-order.php. Apart from all the tag names starting with @, there are 4 other keys in the above array: summary, description, unknown_tags and signature.
Element names
Here is a short description of what these element names signify.
- summary
First line of your PhpDocComment (up to the first dot . or empty line) and will be printed fat. In the above example it is not the first element. For instance the @deprecated tag is before it. It might be convenient for your readers to see that a method or class is deprecated before they start reading the complete description and at the end find the method or class is deprecated.
- description
Rest of your PhpDocComment including inline tags. (Inline tags are surrounded with curly braces: {@inheritdoc}).
- unknown_tags
Tag names found in your PhpDocComments that do not appear in the d2r-order.php. These tags are listed in the final documentation at the specified place. For instance in the above they are listed between the @since and the @uses tags.
By the way, you can specify the order (and layout) of any tag by just incorporating them as key => value in d2r-order.php. Fi “@myTag” => “admonition very important!” will appear as such in the documentation.
- signature
Signature of member. This is a signature:
public static abstract function enumForName( Parameter #0 [ <required> string $id ] ): ?UnitEnum
If you leave out any of the above element name keys, they wil not be printed in the final documentation. The value of element name keys is of no importance; they wil not influence their layout.
Tag names
Tag names in d2r-order.php do not only specify where they appear in the final documentation; the value given determines their layout.
An empty string signifies no special layout. “@param” => “”:
param string $line - line to format
Given one of the Specific Admonitions the tag will be rendered as such. “@deprecated” => “warning”:
Warning
@deprecated 1.0.1 Use alternative method
The special admonition directive with no further name specified will take the tag name as title. “@todo” => “admonition”:
@todo
Explain the function of this method
Given a title it will be rendered as shown below. Example: “@see” => “admonition see also”:
see also
d2r-styles.txt
d2r-styles.txt is placed in your doc_root folder after running quickstart. It contains some style elements used by doc2rst. You can alter them as you please.
- .block
style of the datetime stamp at the end of each page
- .tag0
style of inline tag names
- .tag3 - tag12
style of tags as they are displayed in groups. Determines the width of the column.
PHPDocComments
There are PSR standards for PHPDoc Comments and the use of tags:
Usage of the @inheritdoc tag
The @inheritdoc tag can appear inline and at the start of a new line in your documentation. Here are some examples of the usage in doc2rst api-documentation:
Single inheritance in AbstractStaticContainer.
Multiple inheritance. Just repeat the @inheritdoc tag as many times as relevant. The order in which the inherited docs appear cannot be specified. Multiple inheritance in RunConfiguration.
Inline usage in RunConfiguration::reset.
api-docs
doc2rst
Packages and classes to transform PHPDocComments to reStructuredText
d2r
Miscellaneous files
d2r-styles.txt is injected at the top of each generated rst-document and has style instructions
d2r-order.php has information about the order of elements in the generated documentation, as well as information about how tags are rendered
d2r-order
namespace |
no namespace |
features |
php-file |
Return
Gives the order of elements in DocComments
Fri, 31 Mar 2023 13:22:46 +0000
downloads
Fri, 31 Mar 2023 13:22:46 +0000
format
Formatters transform specific PHPDoc-blocks to reStructuredText
AbstractFormatter
namespace |
bhenk\doc2rst\format |
predicates |
Abstract |
implements |
|
known subclasses |
Formatters transform specific PHPDoc-blocks to reStructuredText
Methods
AbstractFormatter::handleLine
predicates |
public | abstract |
Handle a line of PHPDoc
As long as the formatter wants more lines it should return true. When it has enough it should return false.
public abstract function handleLine(
Parameter #0 [ <required> string $line ]
): bool
AbstractFormatter::addLine
predicates |
protected |
Add a line to the resulting block
protected function addLine(
Parameter #0 [ <required> Stringable|string $line ]
): void
AbstractFormatter::__toString
predicates |
public |
implements |
Returns a reStructuredText representation of the contents of the block
public function __toString(): string
AbstractFormatter::getLineCount
predicates |
protected |
protected function getLineCount(): int
AbstractFormatter::increaseLineCount
predicates |
protected |
protected function increaseLineCount(): int
Fri, 31 Mar 2023 13:22:46 +0000
CodeBlockFormatter
namespace |
bhenk\doc2rst\format |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
Renders a code block
This nameless formatter is handling everything between 3 tics that start on a new line and that are not followed by a formatter name. The block is ended with 3 tics on a new line.
syntax
```
<code>
<more code>
(...)
```
This is the result:
<code>
<more code>
(...)
Methods
CodeBlockFormatter::handleLine
predicates |
public |
implements |
@inheritdoc
Handle a line of PHPDoc
As long as the formatter wants more lines it should return true. When it has enough it should return false.
@inheritdoc
from method AbstractFormatter::handleLine
public function handleLine(
Parameter #0 [ <required> string $line ]
): bool
CodeBlockFormatter::addLine
predicates |
protected |
inherited from |
Add a line to the resulting block
protected function addLine(
Parameter #0 [ <required> Stringable|string $line ]
): void
CodeBlockFormatter::__toString
predicates |
public |
implements |
|
inherited from |
Returns a reStructuredText representation of the contents of the block
public function __toString(): string
CodeBlockFormatter::getLineCount
predicates |
protected |
inherited from |
protected function getLineCount(): int
CodeBlockFormatter::increaseLineCount
predicates |
protected |
inherited from |
protected function increaseLineCount(): int
Fri, 31 Mar 2023 13:22:46 +0000
RestructuredTextFormatter
namespace |
bhenk\doc2rst\format |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
This RestructuredTextFormatter is handling literal reStructuredText
This formatter is started with 3 tics on a new line, followed by rst. Optionally this is followed by a command followed by zero or more parameters. The block is ended with 3 tics on a new line.
syntax
```rst [command] [...]
.. rst instructions
(...)
```
RestructuredTextFormatter for now only knows one command: replace. This command works similar to the PHP-function str_replace and works on the contents of the block. The replace command takes 2 parameters: search-string, replace-string.
Example
```rst replace & @
.. code-block::
¶m ["Type"] $[name] [<description>]
```
The result:
@param ["Type"] $[name] [<description>]
In the above the tag-name @param can be in a code block of the PHPDoc, without being mangled by your IDE, that thinks you misplaced a tag.
Of course, you can always use rst directly in your PHPDocs:
.. hint:: text of special interest
Result:
Hint
text of special interest
Methods
RestructuredTextFormatter::handleLine
predicates |
public |
implements |
@inheritdoc
Handle a line of PHPDoc
As long as the formatter wants more lines it should return true. When it has enough it should return false.
@inheritdoc
from method AbstractFormatter::handleLine
public function handleLine(
Parameter #0 [ <required> string $line ]
): bool
RestructuredTextFormatter::addLine
predicates |
protected |
inherited from |
Add a line to the resulting block
protected function addLine(
Parameter #0 [ <required> Stringable|string $line ]
): void
RestructuredTextFormatter::__toString
predicates |
public |
implements |
|
inherited from |
Returns a reStructuredText representation of the contents of the block
public function __toString(): string
RestructuredTextFormatter::getLineCount
predicates |
protected |
inherited from |
protected function getLineCount(): int
RestructuredTextFormatter::increaseLineCount
predicates |
protected |
inherited from |
protected function increaseLineCount(): int
Fri, 31 Mar 2023 13:22:46 +0000
Fri, 31 Mar 2023 13:22:46 +0000
globals
Classes in globals have information about run configuration and naively keep track of source, and document state
AbstractStaticContainer
namespace |
bhenk\doc2rst\globals |
predicates |
Abstract |
implements |
|
known subclasses |
Base class for static container classes that load their values from an Array
Implementations of this abstract static container use a UnitEnum to correlate their properties to keys in the array in a way that
property name == enum->name == key
method name == [get|set] + camelcase(property name)
@inheritdoc
Describes the interface of a container that exposes methods to read its entries
@inheritdoc
from interface ContainerInterface
Methods
AbstractStaticContainer::enumForName
predicates |
public | static | abstract |
Returns the enum case for the given $id or null if it does not exist
public static abstract function enumForName(
Parameter #0 [ <required> string $id ]
): ?UnitEnum
AbstractStaticContainer::get
predicates |
public |
implements |
@inheritdoc
Finds an entry of the container by its identifier and returns it
@inheritdoc
from method ContainerInterface::get
public function get(
Parameter #0 [ <required> string $id ]
): mixed
AbstractStaticContainer::has
predicates |
public |
implements |
@inheritdoc
Returns true if the container can return an entry for the given identifier
Returns false otherwise.
has($id) returning true does not mean that get($id) will not throw an exception. It does however mean that get($id) will not throw a NotFoundExceptionInterface.
@inheritdoc
from method ContainerInterface::has
public function has(
Parameter #0 [ <required> string $id ]
): bool
AbstractStaticContainer::__toString
predicates |
public |
implements |
Returns a string representation of this container
public function __toString(): string
AbstractStaticContainer::load
predicates |
public | static |
Load the container with the given configuration
Keys in the array configuration should correspond to the names of cases in the UnitEnum given by AbstractStaticContainer::enumForName.
public static function load(
Parameter #0 [ <required> array $configuration ]
): void
AbstractStaticContainer::toArray
predicates |
public | static |
Returns an array representing the container
public static function toArray(): array
AbstractStaticContainer::reset
predicates |
public | static |
Reset the container to a neutral state (not necessarily to its original state)
public static function reset(): array
AbstractStaticContainer::getMethodName
predicates |
public | static |
Return the method name part corresponding to the given $id
Input of snake_like_name, output CamelCaseName:
foo_bar_name -> FooBarName
public static function getMethodName(
Parameter #0 [ <required> string $id ]
): string
Fri, 31 Mar 2023 13:22:46 +0000
ContainerException
namespace |
bhenk\doc2rst\globals |
predicates |
Instantiable |
implements |
|
extends |
|
hierarchy |
@inheritdoc
Base interface representing a generic exception in a container
@inheritdoc
from interface ContainerExceptionInterface
Constructor
ContainerException::__construct
predicates |
public | constructor |
inherited from |
public function __construct(
Parameter #0 [ <optional> string $message = "" ]
Parameter #1 [ <optional> int $code = 0 ]
Parameter #2 [ <optional> ?Throwable $previous = null ]
)
Methods
ContainerException::__wakeup
predicates |
public |
inherited from |
public function __wakeup()
ContainerException::getMessage
predicates |
public | final |
implements |
|
inherited from |
public final function getMessage(): string
ContainerException::getCode
predicates |
public | final |
implements |
|
inherited from |
public final function getCode()
ContainerException::getFile
predicates |
public | final |
implements |
|
inherited from |
public final function getFile(): string
ContainerException::getLine
predicates |
public | final |
implements |
|
inherited from |
public final function getLine(): int
ContainerException::getTrace
predicates |
public | final |
implements |
|
inherited from |
public final function getTrace(): array
ContainerException::getPrevious
predicates |
public | final |
implements |
|
inherited from |
public final function getPrevious(): ?Throwable
ContainerException::getTraceAsString
predicates |
public | final |
implements |
|
inherited from |
public final function getTraceAsString(): string
ContainerException::__toString
predicates |
public |
implements |
|
inherited from |
public function __toString(): string
Fri, 31 Mar 2023 13:22:46 +0000
D2R
namespace |
bhenk\doc2rst\globals |
predicates |
Cloneable | Instantiable |
Loads internal and external configuration files
see also
Constants
D2R::CONFIGURATION_FILENAME
predicates |
public |
string(12) "d2r-conf.php"
D2R::STYLES_FILENAME
predicates |
public |
string(14) "d2r-styles.txt"
D2R::COMMENT_ORDER_FILENAME
predicates |
public |
string(13) "d2r-order.php"
Methods
D2R::getStyles
predicates |
public | static |
public static function getStyles(): string
D2R::getCommentOrder
predicates |
public | static |
public static function getCommentOrder(): array
D2R::getCommentOrderContents
predicates |
public | static |
public static function getCommentOrderContents(): string
D2R::getInternalOrderFilename
predicates |
public | static |
public static function getInternalOrderFilename(): string
Fri, 31 Mar 2023 13:22:46 +0000
DCO
namespace |
bhenk\doc2rst\globals |
predicates |
Final | Enum |
implements |
Constants
DCO::api
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::api)
DCO::copyright
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::copyright)
DCO::deprecated
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::deprecated)
DCO::description
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::description)
DCO::generated
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::generated)
DCO::inheritDoc
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::inheritDoc)
DCO::internal
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::internal)
DCO::license
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::license)
DCO::link
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::link)
DCO::method
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::method)
DCO::package
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::package)
DCO::param
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::param)
DCO::return
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::return)
DCO::see
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::see)
DCO::signature
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::signature)
DCO::since
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::since)
DCO::summary
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::summary)
DCO::todo
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::todo)
DCO::throws
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::throws)
DCO::uses
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::uses)
DCO::var
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::var)
DCO::version
predicates |
public | enum case |
enum(bhenk\doc2rst\globals\DCO::version)
Methods
DCO::cases
predicates |
public | static |
implements |
public static function cases(): array
DCO::from
predicates |
public | static |
implements |
public static function from(
Parameter #0 [ <required> string|int $value ]
): static
DCO::tryFrom
predicates |
public | static |
implements |
public static function tryFrom(
Parameter #0 [ <required> string|int $value ]
): ?static
Fri, 31 Mar 2023 13:22:46 +0000
DocState
namespace |
bhenk\doc2rst\globals |
predicates |
Cloneable | Instantiable |
Methods
DocState::isPreRun
predicates |
public | static |
public static function isPreRun(): bool
DocState::setPreRun
predicates |
public | static |
public static function setPreRun(
Parameter #0 [ <required> bool $preRun ]
): void
DocState::addAbsoluteFile
predicates |
public | static |
public static function addAbsoluteFile(
Parameter #0 [ <required> string $abs_file ]
): void
DocState::addAbsoluteDir
predicates |
public | static |
public static function addAbsoluteDir(
Parameter #0 [ <required> string $abs_dir ]
): void
DocState::getHash
predicates |
public | static |
public static function getHash(
Parameter #0 [ <required> string $filename ]
): string
DocState::getPreRunFiles
predicates |
public | static |
public static function getPreRunFiles(): array
DocState::setPreRunFiles
predicates |
public | static |
public static function setPreRunFiles(
Parameter #0 [ <required> array $preRunFiles ]
): void
DocState::getPreRunDirs
predicates |
public | static |
public static function getPreRunDirs(): array
DocState::setPreRunDirs
predicates |
public | static |
public static function setPreRunDirs(
Parameter #0 [ <required> array $preRunDirs ]
): void
DocState::getPostRunFiles
predicates |
public | static |
public static function getPostRunFiles(): array
DocState::setPostRunFiles
predicates |
public | static |
public static function setPostRunFiles(
Parameter #0 [ <required> array $postRunFiles ]
): void
DocState::getPostRunDirs
predicates |
public | static |
public static function getPostRunDirs(): array
DocState::setPostRunDirs
predicates |
public | static |
public static function setPostRunDirs(
Parameter #0 [ <required> array $postRunDirs ]
): void
Fri, 31 Mar 2023 13:22:46 +0000
FileTypes
namespace |
bhenk\doc2rst\globals |
predicates |
Cloneable | Instantiable |
Constants
FileTypes::PHP
predicates |
public |
int(1)
FileTypes::MD
predicates |
public |
int(2)
FileTypes::RST
predicates |
public |
int(4)
Fri, 31 Mar 2023 13:22:46 +0000
NotFoundException
namespace |
bhenk\doc2rst\globals |
predicates |
Instantiable |
implements |
Stringable | Throwable | NotFoundExceptionInterface | ContainerExceptionInterface |
extends |
|
hierarchy |
@inheritdoc
No entry was found in the container
@inheritdoc
from interface NotFoundExceptionInterface
@inheritdoc
Base interface representing a generic exception in a container
@inheritdoc
from interface ContainerExceptionInterface
Constructor
NotFoundException::__construct
predicates |
public | constructor |
inherited from |
public function __construct(
Parameter #0 [ <optional> string $message = "" ]
Parameter #1 [ <optional> int $code = 0 ]
Parameter #2 [ <optional> ?Throwable $previous = null ]
)
Methods
NotFoundException::__wakeup
predicates |
public |
inherited from |
public function __wakeup()
NotFoundException::getMessage
predicates |
public | final |
implements |
|
inherited from |
public final function getMessage(): string
NotFoundException::getCode
predicates |
public | final |
implements |
|
inherited from |
public final function getCode()
NotFoundException::getFile
predicates |
public | final |
implements |
|
inherited from |
public final function getFile(): string
NotFoundException::getLine
predicates |
public | final |
implements |
|
inherited from |
public final function getLine(): int
NotFoundException::getTrace
predicates |
public | final |
implements |
|
inherited from |
public final function getTrace(): array
NotFoundException::getPrevious
predicates |
public | final |
implements |
|
inherited from |
public final function getPrevious(): ?Throwable
NotFoundException::getTraceAsString
predicates |
public | final |
implements |
|
inherited from |
public final function getTraceAsString(): string
NotFoundException::__toString
predicates |
public |
implements |
|
inherited from |
public function __toString(): string
Fri, 31 Mar 2023 13:22:46 +0000
RC
namespace |
bhenk\doc2rst\globals |
predicates |
Final | Enum |
implements |
Holds property names for configuration of Container RunConfiguration
The names of cases in this enum correspond to keys in the d2r-conf.php configuration file, found in your { doc_root } directory after running ProcessManager::quickStart().
Constants
RC::application_root
predicates |
public | enum case |
The source directory, usually indicated with names like src or application
(string)
For autoconfiguration:
project_directory/application_root
enum(bhenk\doc2rst\globals\RC::application_root)
RC::vendor_directory
predicates |
public | enum case |
The vendor directory or first part of namespace
(string)
For autoconfiguration:
project_directory/application_root/vendor_directory
enum(bhenk\doc2rst\globals\RC::vendor_directory)
RC::bootstrap_file
predicates |
public | enum case |
Location of the bootstrap file
(string)
The file that locates your classes and third party classes used by your program. When using composer can be as simple as
<?php
require_once "path/to/your/vendor/autoload.php";
enum(bhenk\doc2rst\globals\RC::bootstrap_file)
RC::doc_root
predicates |
public | enum case |
The documentation directory; autoconfiguration is computed from this directory
(string)
For autoconfiguration:
project_directory/doc_root
enum(bhenk\doc2rst\globals\RC::doc_root)
RC::api_directory
predicates |
public | enum case |
The directory for api-documentation
(string)
For autoconfiguration:
project_directory/doc_root/api_directory
enum(bhenk\doc2rst\globals\RC::api_directory)
RC::api_docs_title
predicates |
public | enum case |
Title of the root entry in the generated api-documentation
(string)
enum(bhenk\doc2rst\globals\RC::api_docs_title)
RC::show_visibility
predicates |
public | enum case |
Specify which members will be documented
(int)
The integer corresponds to -and can be expressed as- the constants for visibility found in ReflectionMethod Modifiers:
Hint
The values of these constants may change between PHP versions. It is recommended to always use the constants and not rely on the values directly.
It is perfectly alright to run doc2rst with show_visibility set to any possible number, though doc2rst may not be able to resolve all internal links (because some targets are absent after running with such visibility limitations). Best practice for communicating your library remains to document public and protected members.
show_visibility = ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED
enum(bhenk\doc2rst\globals\RC::show_visibility)
RC::excludes
predicates |
public | enum case |
Array of (parts of) namespaces and classes to exclude from documentation
(array)
To exclude complete branches, it is enough to exclude the root of that branch. To exclude individual classes, the fully qualified name of the class should be given
enum(bhenk\doc2rst\globals\RC::excludes)
RC::log_level
predicates |
public | enum case |
Level of logging during generation of documentation
(int)
Log level expressed as int, interval 100:
error always, warning <= 400, notice <= 300, info <= 200, debug <= 100
enum(bhenk\doc2rst\globals\RC::log_level)
RC::toctree_max_depth
predicates |
public | enum case |
Max depth for the toctree directive
(int)
see also
enum(bhenk\doc2rst\globals\RC::toctree_max_depth)
RC::toctree_titles_only
predicates |
public | enum case |
Only document titles should show up in the toctree, not other headings
(bool)
see also
enum(bhenk\doc2rst\globals\RC::toctree_titles_only)
RC::show_class_contents
predicates |
public | enum case |
Should a table of contents appear at the top of the class documentation
(bool)
enum(bhenk\doc2rst\globals\RC::show_class_contents)
RC::user_provided_links
predicates |
public | enum case |
User provided mapping of `namespace\classname` to links that give access to documentation on these types
Classes in external libraries cannot be linked to their documentation automatically.
(array)
enum(bhenk\doc2rst\globals\RC::user_provided_links)
RC::link_to_sources
predicates |
public | enum case |
If no documentation of `namespace\classname` can be found, should a link to the (local) source file be provided
Classes in external libraries can be linked to their local source files.
(bool)
enum(bhenk\doc2rst\globals\RC::link_to_sources)
RC::link_to_search_engine
predicates |
public | enum case |
If no documentation on `namespace\classname` can be found, should a link to a search engine be provided
(bool)
The search engine url will have the namespace\classname in the query parameter.
enum(bhenk\doc2rst\globals\RC::link_to_search_engine)
RC::download_file_ext
predicates |
public | enum case |
Downloadable file extension list
(array)
If files with these extensions are found in the source tree, they will be made downloadable from the package documentation page under the heading downloads.
Hint
It is also possible to add individual files to the downloads section of the package documentation page.
enum(bhenk\doc2rst\globals\RC::download_file_ext)
RC::show_datestamp
predicates |
public | enum case |
Prevent or allow datestamp
(bool)
Each page in the generated documentation gets a datestamp at the foot of the page. It shows when the rst-file (not the html-file) was generated. This can be a nuisance during development and the use of VCR’s. Each time you generate documentation the datestamp will differ and consequently your VCR sees that as changes in the file and wants you to commit the changes. In order to prevent this set show_datestamp to false.
enum(bhenk\doc2rst\globals\RC::show_datestamp)
Methods
RC::forName
predicates |
public | static |
Gets the enum case for the given name or null if it doesn’t exist
public static function forName(
Parameter #0 [ <required> string $name ]
): ?RC
RC::cases
predicates |
public | static |
implements |
public static function cases(): array
Fri, 31 Mar 2023 13:22:46 +0000
RunConfiguration
namespace |
bhenk\doc2rst\globals |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
Container for run-time configuration settings
This class represents -and is loaded with- the d2r-conf.php file in the docs folder. It uses the enum RC as a safeguard for correctly spelled property names.
@inheritdoc
Base class for static container classes that load their values from an Array
Implementations of this abstract static container use a UnitEnum to correlate their properties to keys in the array in a way that
property name == enum->name == key
method name == [get|set] + camelcase(property name)
@inheritdoc
from class AbstractStaticContainer
@inheritdoc
Describes the interface of a container that exposes methods to read its entries
@inheritdoc
from interface ContainerInterface
Constants
RunConfiguration::DEFAULT_DOWNLOADABLES
predicates |
public |
array(4) { [0]=> string(4) ".txt" [1]=> string(4) ".csv" [2]=> string(3) ".js" [3]=> s ...
Methods
RunConfiguration::enumForName
predicates |
public | static |
implements |
Gets the RC-enum case for the corresponding RC-enum name
@inheritdoc
Returns the enum case for the given $id or null if it does not exist
@inheritdoc
from method AbstractStaticContainer::enumForName
public static function enumForName(
Parameter #0 [ <required> string $id ]
): ?UnitEnum
RunConfiguration::reset
predicates |
public | static |
implements |
Reset properties to their defaults
The reset action of this class is superimposed on that of the parent class:
@inheritdoc
Reset the container to a neutral state (not necessarily to its original state)
@inheritdoc
from method AbstractStaticContainer::reset
A call to reset on this class will reset it to its original state.
public static function reset(): array
RunConfiguration::toString
predicates |
public | static |
public static function toString(): string
RunConfiguration::getApplicationRoot
predicates |
public | static |
public static function getApplicationRoot(): ?string
RunConfiguration::setApplicationRoot
predicates |
public | static |
public static function setApplicationRoot(
Parameter #0 [ <required> ?string $application_root ]
): void
RunConfiguration::getVendorDirectory
predicates |
public | static |
public static function getVendorDirectory(): ?string
RunConfiguration::setVendorDirectory
predicates |
public | static |
public static function setVendorDirectory(
Parameter #0 [ <required> ?string $vendor_directory ]
): void
RunConfiguration::getBootstrapFile
predicates |
public | static |
public static function getBootstrapFile(): ?string
RunConfiguration::setBootstrapFile
predicates |
public | static |
public static function setBootstrapFile(
Parameter #0 [ <required> ?string $bootstrap_file ]
): void
RunConfiguration::getDocRoot
predicates |
public | static |
public static function getDocRoot(): ?string
RunConfiguration::setDocRoot
predicates |
public | static |
public static function setDocRoot(
Parameter #0 [ <required> ?string $doc_root ]
): void
RunConfiguration::getApiDirectory
predicates |
public | static |
public static function getApiDirectory(): ?string
RunConfiguration::setApiDirectory
predicates |
public | static |
public static function setApiDirectory(
Parameter #0 [ <required> ?string $api_directory ]
): void
RunConfiguration::getShowVisibility
predicates |
public | static |
public static function getShowVisibility(): int
RunConfiguration::setShowVisibility
predicates |
public | static |
public static function setShowVisibility(
Parameter #0 [ <required> int $visibility ]
): void
RunConfiguration::getLogLevel
predicates |
public | static |
public static function getLogLevel(): ?int
RunConfiguration::setLogLevel
predicates |
public | static |
public static function setLogLevel(
Parameter #0 [ <required> int $log_level ]
): void
RunConfiguration::getExcludes
predicates |
public | static |
public static function getExcludes(): array
RunConfiguration::setExcludes
predicates |
public | static |
public static function setExcludes(
Parameter #0 [ <required> array $excludes ]
): void
RunConfiguration::addExcluded
predicates |
public | static |
public static function addExcluded(
Parameter #0 [ <required> string $path ]
): void
RunConfiguration::getApiDocsTitle
predicates |
public | static |
public static function getApiDocsTitle(): ?string
RunConfiguration::setApiDocsTitle
predicates |
public | static |
public static function setApiDocsTitle(
Parameter #0 [ <required> ?string $api_docs_title ]
): void
RunConfiguration::getToctreeMaxDepth
predicates |
public | static |
public static function getToctreeMaxDepth(): int
RunConfiguration::setToctreeMaxDepth
predicates |
public | static |
public static function setToctreeMaxDepth(
Parameter #0 [ <required> int $toctree_max_depth ]
): void
RunConfiguration::getToctreeTitlesOnly
predicates |
public | static |
public static function getToctreeTitlesOnly(): bool
RunConfiguration::setToctreeTitlesOnly
predicates |
public | static |
public static function setToctreeTitlesOnly(
Parameter #0 [ <required> bool $toctree_titles_only ]
): void
RunConfiguration::getShowClassContents
predicates |
public | static |
public static function getShowClassContents(): bool
RunConfiguration::setShowClassContents
predicates |
public | static |
public static function setShowClassContents(
Parameter #0 [ <required> bool $show_class_contents ]
): void
RunConfiguration::getUserProvidedLinks
predicates |
public | static |
public static function getUserProvidedLinks(): array
RunConfiguration::setUserProvidedLinks
predicates |
public | static |
public static function setUserProvidedLinks(
Parameter #0 [ <required> array $user_provided_links ]
): void
RunConfiguration::addUserProvidedLink
predicates |
public | static |
public static function addUserProvidedLink(
Parameter #0 [ <required> string $key ]
Parameter #1 [ <required> string $location ]
)
RunConfiguration::getLinkToSources
predicates |
public | static |
public static function getLinkToSources(): bool
RunConfiguration::setLinkToSources
predicates |
public | static |
public static function setLinkToSources(
Parameter #0 [ <required> bool $link_to_sources ]
): void
RunConfiguration::getLinkToSearchEngine
predicates |
public | static |
public static function getLinkToSearchEngine(): bool
RunConfiguration::setLinkToSearchEngine
predicates |
public | static |
public static function setLinkToSearchEngine(
Parameter #0 [ <required> bool $link_to_search_engine ]
): void
RunConfiguration::getDownloadFileExt
predicates |
public | static |
public static function getDownloadFileExt(): array
RunConfiguration::setDownloadFileExt
predicates |
public | static |
public static function setDownloadFileExt(
Parameter #0 [ <required> array $download_file_ext ]
): void
RunConfiguration::getShowDatestamp
predicates |
public | static |
public static function getShowDatestamp(): bool
RunConfiguration::setShowDatestamp
predicates |
public | static |
public static function setShowDatestamp(
Parameter #0 [ <required> bool $show_datestamp ]
): void
RunConfiguration::get
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Finds an entry of the container by its identifier and returns it
@inheritdoc
from method ContainerInterface::get
public function get(
Parameter #0 [ <required> string $id ]
): mixed
RunConfiguration::has
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Returns true if the container can return an entry for the given identifier
Returns false otherwise.
has($id) returning true does not mean that get($id) will not throw an exception. It does however mean that get($id) will not throw a NotFoundExceptionInterface.
@inheritdoc
from method ContainerInterface::has
public function has(
Parameter #0 [ <required> string $id ]
): bool
RunConfiguration::__toString
predicates |
public |
implements |
|
inherited from |
Returns a string representation of this container
public function __toString(): string
RunConfiguration::load
predicates |
public | static |
inherited from |
Load the container with the given configuration
Keys in the array configuration should correspond to the names of cases in the UnitEnum given by AbstractStaticContainer::enumForName.
public static function load(
Parameter #0 [ <required> array $configuration ]
): void
RunConfiguration::toArray
predicates |
public | static |
inherited from |
Returns an array representing the container
public static function toArray(): array
RunConfiguration::getMethodName
predicates |
public | static |
inherited from |
Return the method name part corresponding to the given $id
Input of snake_like_name, output CamelCaseName:
foo_bar_name -> FooBarName
public static function getMethodName(
Parameter #0 [ <required> string $id ]
): string
Fri, 31 Mar 2023 13:22:46 +0000
SourceState
namespace |
bhenk\doc2rst\globals |
predicates |
Cloneable | Instantiable |
Methods
SourceState::countFiles
predicates |
public | static |
public static function countFiles(): int
SourceState::countDirectories
predicates |
public | static |
public static function countDirectories(): int
SourceState::addDirectory
predicates |
public | static |
public static function addDirectory(
Parameter #0 [ <required> string $directory ]
): void
SourceState::addPhpFile
predicates |
public | static |
public static function addPhpFile(
Parameter #0 [ <required> string $php_file ]
): void
SourceState::addJsFile
predicates |
public | static |
public static function addJsFile(
Parameter #0 [ <required> string $js_file ]
): void
SourceState::addSqlFile
predicates |
public | static |
public static function addSqlFile(
Parameter #0 [ <required> string $sql_file ]
): void
SourceState::addMdFile
predicates |
public | static |
public static function addMdFile(
Parameter #0 [ <required> string $md_file ]
): void
SourceState::addRstFile
predicates |
public | static |
public static function addRstFile(
Parameter #0 [ <required> string $rst_file ]
): void
SourceState::addOtherFile
predicates |
public | static |
public static function addOtherFile(
Parameter #0 [ <required> string $other_file ]
): void
SourceState::getDirectories
predicates |
public | static |
public static function getDirectories(): array
SourceState::setDirectories
predicates |
public | static |
public static function setDirectories(
Parameter #0 [ <required> array $directories ]
): void
SourceState::getPhpFiles
predicates |
public | static |
public static function getPhpFiles(): array
SourceState::setPhpFiles
predicates |
public | static |
public static function setPhpFiles(
Parameter #0 [ <required> array $php_files ]
): void
SourceState::getJsFiles
predicates |
public | static |
public static function getJsFiles(): array
SourceState::setJsFiles
predicates |
public | static |
public static function setJsFiles(
Parameter #0 [ <required> array $js_files ]
): void
SourceState::getSqlFiles
predicates |
public | static |
public static function getSqlFiles(): array
SourceState::setSqlFiles
predicates |
public | static |
public static function setSqlFiles(
Parameter #0 [ <required> array $sql_files ]
): void
SourceState::getMdFiles
predicates |
public | static |
public static function getMdFiles(): array
SourceState::setMdFiles
predicates |
public | static |
public static function setMdFiles(
Parameter #0 [ <required> array $md_files ]
): void
SourceState::getRstFiles
predicates |
public | static |
public static function getRstFiles(): array
SourceState::setRstFiles
predicates |
public | static |
public static function setRstFiles(
Parameter #0 [ <required> array $rst_files ]
): void
SourceState::getOtherFiles
predicates |
public | static |
public static function getOtherFiles(): array
SourceState::setOtherFiles
predicates |
public | static |
public static function setOtherFiles(
Parameter #0 [ <required> array $other_files ]
): void
SourceState::getFileOrder
predicates |
public | static |
public static function getFileOrder(): array
SourceState::setFileOrder
predicates |
public | static |
public static function setFileOrder(
Parameter #0 [ <required> array $file_order ]
): void
Fri, 31 Mar 2023 13:22:46 +0000
Fri, 31 Mar 2023 13:22:46 +0000
log
Depends on |
Dependency invoked by |
---|---|
Log process information to console
Log
namespace |
bhenk\doc2rst\log |
predicates |
Cloneable | Instantiable |
Methods
Log::setEnabled
predicates |
public | static |
public static function setEnabled(
Parameter #0 [ <required> bool $enabled ]
): void
Log::error
predicates |
public | static |
public static function error(
Parameter #0 [ <required> string $err ]
Parameter #1 [ <optional> ?Throwable $e = NULL ]
Parameter #2 [ <optional> bool $back_trace = true ]
): void
Log::warning
predicates |
public | static |
public static function warning(
Parameter #0 [ <required> string $warning ]
Parameter #1 [ <optional> bool $back_trace = true ]
): void
Log::notice
predicates |
public | static |
public static function notice(
Parameter #0 [ <required> string $out ]
Parameter #1 [ <optional> bool $back_trace = true ]
): void
Log::info
predicates |
public | static |
public static function info(
Parameter #0 [ <required> string $out ]
Parameter #1 [ <optional> bool $back_trace = true ]
): void
Log::debug
predicates |
public | static |
public static function debug(
Parameter #0 [ <required> string $out ]
Parameter #1 [ <optional> bool $back_trace = true ]
): void
Log::getErrorCount
predicates |
public | static |
public static function getErrorCount(): int
Log::getWarningsCount
predicates |
public | static |
public static function getWarningsCount(): int
Fri, 31 Mar 2023 13:22:46 +0000
Fri, 31 Mar 2023 13:22:46 +0000
process
Depends on |
Dependency invoked by |
---|---|
ClassLexer | CommentOrganizer | Constitution | DocScout | DocWorker | ProcessManager | SourceScout | TreeWorker |
|
AbstractLexer | Constitution | DocWorker | FunctionLexer | MethodLexer | ProcessManager | SourceScout | TreeWorker |
|
ClassLexer | ConstantLexer | DocWorker | FunctionLexer | MethodLexer | SourceScout | TreeWorker |
|
AbstractLexer | CommentLexer | CommentOrganizer | FunctionLexer | MethodLexer |
|
AbstractLexer | ClassLexer | CommentHelper | ConstantLexer | DocWorker | FunctionLexer | MethodLexer | TreeWorker |
Main processing logic
AbstractLexer
namespace |
bhenk\doc2rst\process |
predicates |
Abstract |
implements |
|
known subclasses |
ClassLexer | CommentLexer | ConstantLexer | FunctionLexer | MethodLexer |
Methods
AbstractLexer::__toString
predicates |
public |
implements |
see also
public function __toString(): string
AbstractLexer::getSegments
predicates |
public |
public function getSegments(): array
AbstractLexer::setSegments
predicates |
public |
public function setSegments(
Parameter #0 [ <required> array $segments ]
): void
AbstractLexer::addSegment
predicates |
public |
public function addSegment(
Parameter #0 [ <required> Stringable|string $segment ]
): void
AbstractLexer::resolveReflectionType
predicates |
protected |
protected function resolveReflectionType(
Parameter #0 [ <required> ReflectionType $reflectionType ]
): string
AbstractLexer::checkParameters
predicates |
protected |
protected function checkParameters(
Parameter #0 [ <required> bhenk\doc2rst\process\CommentLexer $lexer ]
Parameter #1 [ <required> array $params ]
): void
Fri, 31 Mar 2023 13:22:46 +0000
ClassLexer
namespace |
bhenk\doc2rst\process |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
Constructor
ClassLexer::__construct
predicates |
public | constructor |
public function __construct(
Parameter #0 [ <required> ReflectionClass $class ]
)
Methods
ClassLexer::lex
predicates |
public |
public function lex(): void
ClassLexer::__toString
predicates |
public |
implements |
|
inherited from |
see also
public function __toString(): string
ClassLexer::getSegments
predicates |
public |
inherited from |
public function getSegments(): array
ClassLexer::setSegments
predicates |
public |
inherited from |
public function setSegments(
Parameter #0 [ <required> array $segments ]
): void
ClassLexer::addSegment
predicates |
public |
inherited from |
public function addSegment(
Parameter #0 [ <required> Stringable|string $segment ]
): void
ClassLexer::resolveReflectionType
predicates |
protected |
inherited from |
protected function resolveReflectionType(
Parameter #0 [ <required> ReflectionType $reflectionType ]
): string
ClassLexer::checkParameters
predicates |
protected |
inherited from |
protected function checkParameters(
Parameter #0 [ <required> bhenk\doc2rst\process\CommentLexer $lexer ]
Parameter #1 [ <required> array $params ]
): void
Fri, 31 Mar 2023 13:22:46 +0000
CommentHelper
namespace |
bhenk\doc2rst\process |
predicates |
Cloneable | Instantiable |
Methods
CommentHelper::resetReportedClasses
predicates |
public | static |
public static function resetReportedClasses(): void
CommentHelper::getInheritedComment
predicates |
public |
public function getInheritedComment(): string
Fri, 31 Mar 2023 13:22:46 +0000
CommentLexer
namespace |
bhenk\doc2rst\process |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
Reads and processes DocComments
According to PSR-5 Definitions a “DocComment” is a special type of comment which MUST
start with the character sequence /** followed by a whitespace character
end with */ and
have zero or more lines in between.
This CommentLexer reads summary lines up to the first period or the first white line is encountered. The rest of the PHPdoc comment is treated as description.
Inline tags are treated as such and rendered at their original location in the text. Inline tags begin with {@ and end with a }. Non-inline tags that are not at the start of a line, will not be rendered. (For instance @link http://whatever.com whatever.)
Tags at the start of a line are filtered out, rendered and appear in a predefined order and location in the documentation. @todo link to comment and tag order
Constructor
CommentLexer::__construct
predicates |
public | constructor |
Constructs a new CommentLexer
public function __construct(
Parameter #0 [ <required> string $docComment ]
Parameter #1 [ <optional> bool $ignoreInheritdoc = false ]
)
Methods
CommentLexer::getCommentOrganizer
predicates |
public |
public function getCommentOrganizer(): CommentOrganizer
CommentLexer::lex
predicates |
public |
public function lex(): void
CommentLexer::markupSummary
predicates |
public |
public function markupSummary(
Parameter #0 [ <required> array $processed ]
): array
CommentLexer::preserveMarkup
predicates |
public | static |
Preserve markup in an otherwise strong line
Example:
before: "Preserves italic *null* and ticks ``true`` markup"
after: "**Preserves italic** *null* **and ticks** ``true`` **markup**"
public static function preserveMarkup(
Parameter #0 [ <required> string $line ]
): string
CommentLexer::__toString
predicates |
public |
implements |
|
inherited from |
see also
public function __toString(): string
CommentLexer::getSegments
predicates |
public |
inherited from |
public function getSegments(): array
CommentLexer::setSegments
predicates |
public |
inherited from |
public function setSegments(
Parameter #0 [ <required> array $segments ]
): void
CommentLexer::addSegment
predicates |
public |
inherited from |
public function addSegment(
Parameter #0 [ <required> Stringable|string $segment ]
): void
CommentLexer::resolveReflectionType
predicates |
protected |
inherited from |
protected function resolveReflectionType(
Parameter #0 [ <required> ReflectionType $reflectionType ]
): string
CommentLexer::checkParameters
predicates |
protected |
inherited from |
protected function checkParameters(
Parameter #0 [ <required> bhenk\doc2rst\process\CommentLexer $lexer ]
Parameter #1 [ <required> array $params ]
): void
Fri, 31 Mar 2023 13:22:46 +0000
CommentOrganizer
namespace |
bhenk\doc2rst\process |
predicates |
Cloneable | Instantiable |
implements |
Constructor
CommentOrganizer::__construct
predicates |
public | constructor |
public function __construct(
Parameter #0 [ <optional> bool $indented = false ]
)
Methods
CommentOrganizer::isIndented
predicates |
public |
public function isIndented(): bool
CommentOrganizer::setIndented
predicates |
public |
public function setIndented(
Parameter #0 [ <required> bool $indented ]
): void
CommentOrganizer::setOrder
predicates |
public |
public function setOrder()
CommentOrganizer::render
predicates |
public |
public function render(): string
CommentOrganizer::__toString
predicates |
public |
implements |
public function __toString(): string
CommentOrganizer::getSummary
predicates |
public |
public function getSummary(): string
CommentOrganizer::setSummary
predicates |
public |
public function setSummary(
Parameter #0 [ <required> Stringable|string $summary ]
): void
CommentOrganizer::getLines
predicates |
public |
public function getLines(): array
CommentOrganizer::setLines
predicates |
public |
public function setLines(
Parameter #0 [ <required> array $lines ]
): void
CommentOrganizer::addLine
predicates |
public |
public function addLine(
Parameter #0 [ <required> Stringable|string $line ]
): void
CommentOrganizer::getSignature
predicates |
public |
public function getSignature(): string
CommentOrganizer::setSignature
predicates |
public |
public function setSignature(
Parameter #0 [ <required> string $signature ]
): void
CommentOrganizer::addTag
predicates |
public |
public function addTag(
Parameter #0 [ <required> bhenk\doc2rst\tag\TagInterface $tag ]
): void
ConstantLexer
namespace |
bhenk\doc2rst\process |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
Constructor
ConstantLexer::__construct
predicates |
public | constructor |
public function __construct(
Parameter #0 [ <required> ReflectionClassConstant $constant ]
)
Methods
ConstantLexer::lex
predicates |
public |
public function lex(): void
ConstantLexer::__toString
predicates |
public |
implements |
|
inherited from |
see also
public function __toString(): string
ConstantLexer::getSegments
predicates |
public |
inherited from |
public function getSegments(): array
ConstantLexer::setSegments
predicates |
public |
inherited from |
public function setSegments(
Parameter #0 [ <required> array $segments ]
): void
ConstantLexer::addSegment
predicates |
public |
inherited from |
public function addSegment(
Parameter #0 [ <required> Stringable|string $segment ]
): void
ConstantLexer::resolveReflectionType
predicates |
protected |
inherited from |
protected function resolveReflectionType(
Parameter #0 [ <required> ReflectionType $reflectionType ]
): string
ConstantLexer::checkParameters
predicates |
protected |
inherited from |
protected function checkParameters(
Parameter #0 [ <required> bhenk\doc2rst\process\CommentLexer $lexer ]
Parameter #1 [ <required> array $params ]
): void
Fri, 31 Mar 2023 13:22:46 +0000
Constitution
namespace |
bhenk\doc2rst\process |
predicates |
Cloneable | Instantiable |
implements |
Constants
Constitution::BOOTSTRAP_PHP
predicates |
public |
string(13) "bootstrap.php"
Constructor
Constitution::__construct
predicates |
public | constructor |
Constructs a new Constitution
public function __construct(
Parameter #0 [ <required> string $doc_root ]
Parameter #1 [ <required> ?string $root ]
)
Methods
Constitution::establishConfiguration
predicates |
public |
implements |
public function establishConfiguration(): void
Constitution::autoFindApplicationRoot
predicates |
public | static |
public static function autoFindApplicationRoot(
Parameter #0 [ <required> string $doc_root ]
Parameter #1 [ <required> ?string $root ]
): ?string
Constitution::autoFindBootstrapFile
predicates |
public | static |
public static function autoFindBootstrapFile(
Parameter #0 [ <required> string $doc_root ]
Parameter #1 [ <required> ?string $root ]
): ?string
Constitution::autoFindVendor
predicates |
public | static |
public static function autoFindVendor(
Parameter #0 [ <required> string $application_root ]
): ?string
Fri, 31 Mar 2023 13:22:46 +0000
ConstitutionInterface
namespace |
bhenk\doc2rst\process |
predicates |
Abstract | Interface |
known implementations |
Implementations of this interface set and/or check runtime configuration
Methods
ConstitutionInterface::establishConfiguration
predicates |
public | abstract |
Set and/or check runtime configuration
public abstract function establishConfiguration(): void
Fri, 31 Mar 2023 13:22:46 +0000
DocScout
namespace |
bhenk\doc2rst\process |
predicates |
Cloneable | Instantiable |
Methods
DocScout::scanDocs
predicates |
public |
public function scanDocs(): void
Fri, 31 Mar 2023 13:22:46 +0000
DocWorker
namespace |
bhenk\doc2rst\process |
predicates |
Cloneable | Instantiable |
Methods
DocWorker::processDoc
predicates |
public |
public function processDoc(
Parameter #0 [ <required> string $path ]
): Document
Fri, 31 Mar 2023 13:22:46 +0000
FunctionLexer
namespace |
bhenk\doc2rst\process |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
Constructor
FunctionLexer::__construct
predicates |
public | constructor |
public function __construct(
Parameter #0 [ <required> ReflectionFunction $function ]
Parameter #1 [ <required> string $fq_classname ]
Parameter #2 [ <required> string $shortname ]
)
Methods
FunctionLexer::lex
predicates |
public |
public function lex(): void
FunctionLexer::__toString
predicates |
public |
implements |
|
inherited from |
see also
public function __toString(): string
FunctionLexer::getSegments
predicates |
public |
inherited from |
public function getSegments(): array
FunctionLexer::setSegments
predicates |
public |
inherited from |
public function setSegments(
Parameter #0 [ <required> array $segments ]
): void
FunctionLexer::addSegment
predicates |
public |
inherited from |
public function addSegment(
Parameter #0 [ <required> Stringable|string $segment ]
): void
FunctionLexer::resolveReflectionType
predicates |
protected |
inherited from |
protected function resolveReflectionType(
Parameter #0 [ <required> ReflectionType $reflectionType ]
): string
FunctionLexer::checkParameters
predicates |
protected |
inherited from |
protected function checkParameters(
Parameter #0 [ <required> bhenk\doc2rst\process\CommentLexer $lexer ]
Parameter #1 [ <required> array $params ]
): void
Fri, 31 Mar 2023 13:22:46 +0000
MethodLexer
namespace |
bhenk\doc2rst\process |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
Constructor
MethodLexer::__construct
predicates |
public | constructor |
public function __construct(
Parameter #0 [ <required> ?ReflectionMethod $method ]
)
Methods
MethodLexer::lex
predicates |
public |
public function lex(): void
MethodLexer::__toString
predicates |
public |
implements |
|
inherited from |
see also
public function __toString(): string
MethodLexer::getSegments
predicates |
public |
inherited from |
public function getSegments(): array
MethodLexer::setSegments
predicates |
public |
inherited from |
public function setSegments(
Parameter #0 [ <required> array $segments ]
): void
MethodLexer::addSegment
predicates |
public |
inherited from |
public function addSegment(
Parameter #0 [ <required> Stringable|string $segment ]
): void
MethodLexer::resolveReflectionType
predicates |
protected |
inherited from |
protected function resolveReflectionType(
Parameter #0 [ <required> ReflectionType $reflectionType ]
): string
MethodLexer::checkParameters
predicates |
protected |
inherited from |
protected function checkParameters(
Parameter #0 [ <required> bhenk\doc2rst\process\CommentLexer $lexer ]
Parameter #1 [ <required> array $params ]
): void
Fri, 31 Mar 2023 13:22:46 +0000
ProcessManager
namespace |
bhenk\doc2rst\process |
predicates |
Cloneable | Instantiable |
Runs the transformation of source files to restructured text files
Constructor
ProcessManager::__construct
predicates |
public | constructor |
Constructs a new ProcessManager
see also
public function __construct(
Parameter #0 [ <required> string $doc_root ]
Parameter #1 [ <optional> ?string $root = NULL ]
)
Methods
ProcessManager::quickStart
predicates |
public |
Quickstart doc2rst
This function will scan the source directory known as vendor_directory. It will not generate rst-files, only suggest reasonable configuration options for file and directory paths. Furthermore, it will place configuration files in the doc_root directory. These configuration files are:
d2r-conf.php - run configuration
d2r-order.php - order of DocComment segments and tag display
d2r-styles.txt - some extra css-styles used by doc2rst
public function quickStart(): void
ProcessManager::run
predicates |
public |
Run doc2rst and generate rst-files
If nothing goes wrong you will find api-documentation in the api_directory folder under your doc_root directory.
see also
public function run(): void
ProcessManager::getConstitution
predicates |
public |
Autoconfiguration is done by an implementation of ConstitutionInterface
At the moment there is only one implementation: Constitution. If necessary write your own Constitution!
public function getConstitution(): ConstitutionInterface
ProcessManager::setConstitution
predicates |
public |
Sets the Constitution used for autoconfiguration
public function setConstitution(
Parameter #0 [ <required> bhenk\doc2rst\process\ConstitutionInterface $constitution ]
): void
Fri, 31 Mar 2023 13:22:46 +0000
SourceScout
namespace |
bhenk\doc2rst\process |
predicates |
Cloneable | Instantiable |
Constructor
SourceScout::__construct
predicates |
public | constructor |
public function __construct()
Methods
SourceScout::scanSource
predicates |
public |
public function scanSource(): void
SourceScout::makeDirectories
predicates |
public |
Makes a directory tree in docs/api folder that mirrors the one encountered in application root
public function makeDirectories(): int
SourceScout::makePhpDirectories
predicates |
public |
Makes a directory tree in docs/api folder that mirrors the ones in application root where php-files were found
public function makePhpDirectories(): int
SourceScout::makeMdDirectories
predicates |
public |
Makes a directory tree in docs/api folder that mirrors the ones in application root where md-files were found
public function makeMdDirectories(): int
SourceScout::makeRstDirectories
predicates |
public |
Makes a directory tree in docs/api folder that mirrors the ones in application root where rst-files were found
public function makeRstDirectories(): int
SourceScout::makeTocFiles
predicates |
public |
public function makeTocFiles(
Parameter #0 [ <required> int $flags ]
): int
Fri, 31 Mar 2023 13:22:46 +0000
TreeWorker
namespace |
bhenk\doc2rst\process |
predicates |
Cloneable | Instantiable |
Methods
TreeWorker::walkTree
predicates |
public |
Scans the vendor_directory and delegates complete creation of docs/api-tree
Each directory in { vendor_directory } is filtered against the array of excluded files. If it falls through it gets its own entry in the { api_docs_title } doc’s toctree. Subsequently, it is searched and documented in its own tree.
public function walkTree(): void
Fri, 31 Mar 2023 13:22:46 +0000
Fri, 31 Mar 2023 13:22:46 +0000
rst
Depends on |
Dependency invoked by |
---|---|
Helper classes capable of expressing rst-syntax
CodeBlock
namespace |
bhenk\doc2rst\rst |
predicates |
Cloneable | Instantiable |
implements |
Constructor
CodeBlock::__construct
predicates |
public | constructor |
public function __construct(
Parameter #0 [ <optional> string $taste = 'php' ]
)
Methods
CodeBlock::__toString
predicates |
public |
implements |
public function __toString(): string
CodeBlock::getLines
predicates |
public |
public function getLines(): array
CodeBlock::setLines
predicates |
public |
public function setLines(
Parameter #0 [ <required> array $lines ]
): void
CodeBlock::addLine
predicates |
public |
public function addLine(
Parameter #0 [ <required> Stringable|string $line ]
): void
CodeBlock::addPart
predicates |
public |
public function addPart(
Parameter #0 [ <required> Stringable|string $part ]
): void
CodeBlock::getTaste
predicates |
public |
public function getTaste(): string
CodeBlock::setTaste
predicates |
public |
public function setTaste(
Parameter #0 [ <required> string $taste ]
): void
Fri, 31 Mar 2023 13:22:46 +0000
Document
namespace |
bhenk\doc2rst\rst |
predicates |
Cloneable | Instantiable |
implements |
Constructor
Document::__construct
predicates |
public | constructor |
public function __construct(
Parameter #0 [ <required> string $filename ]
)
Methods
Document::getFilename
predicates |
public |
public function getFilename(): string
Document::setFilename
predicates |
public |
public function setFilename(
Parameter #0 [ <required> string $filename ]
): void
Document::setDirectory
predicates |
public |
public function setDirectory(
Parameter #0 [ <required> string $dir ]
): void
Document::putContents
predicates |
public |
public function putContents(): void
Document::__toString
predicates |
public |
implements |
public function __toString(): string
Document::getEntries
predicates |
public |
public function getEntries(): array
Document::setEntries
predicates |
public |
public function setEntries(
Parameter #0 [ <required> array $entries ]
): void
Document::addEntry
predicates |
public |
public function addEntry(
Parameter #0 [ <required> Stringable|string $entry ]
): Stringable|string
Fri, 31 Mar 2023 13:22:46 +0000
DownloadList
namespace |
bhenk\doc2rst\rst |
predicates |
Cloneable | Instantiable |
implements |
Constructor
DownloadList::__construct
predicates |
public | constructor |
public function __construct(
Parameter #0 [ <optional> ?string $caption = NULL ]
)
Methods
DownloadList::isEmpty
predicates |
public |
public function isEmpty(): bool
DownloadList::__toString
predicates |
public |
implements |
public function __toString(): string
DownloadList::addEntry
predicates |
public |
public function addEntry(
Parameter #0 [ <required> string $name ]
Parameter #1 [ <required> string $link ]
)
DownloadList::setCaption
predicates |
public |
public function setCaption(
Parameter #0 [ <required> string $caption ]
)
DownloadList::getCaption
predicates |
public |
public function getCaption(): ?string
DownloadList::getEntries
predicates |
public |
public function getEntries(): array
DownloadList::setEntries
predicates |
public |
public function setEntries(
Parameter #0 [ <required> array $entries ]
): void
Fri, 31 Mar 2023 13:22:46 +0000
Label
namespace |
bhenk\doc2rst\rst |
predicates |
Cloneable | Instantiable |
implements |
Constructor
Label::__construct
predicates |
public | constructor |
public function __construct(
Parameter #0 [ <required> string $label_name ]
)
Methods
Label::__toString
predicates |
public |
implements |
public function __toString(): string
Label::getLabelName
predicates |
public |
public function getLabelName(): string
Label::setLabelName
predicates |
public |
public function setLabelName(
Parameter #0 [ <required> string $label_name ]
): void
Fri, 31 Mar 2023 13:22:46 +0000
Table
namespace |
bhenk\doc2rst\rst |
predicates |
Cloneable | Instantiable |
implements |
Constructor
Table::__construct
predicates |
public | constructor |
public function __construct(
Parameter #0 [ <required> int $columns ]
)
Methods
Table::setHeading
predicates |
public |
public function setHeading(
Parameter #0 [ <optional> Stringable|string|int|bool ...$row ]
): void
Table::addRow
predicates |
public |
public function addRow(
Parameter #0 [ <optional> Stringable|string|int|bool ...$row ]
): void
Table::__toString
predicates |
public |
implements |
public function __toString(): string
Fri, 31 Mar 2023 13:22:46 +0000
Title
namespace |
bhenk\doc2rst\rst |
predicates |
Cloneable | Instantiable |
implements |
Constructor
Title::__construct
predicates |
public | constructor |
public function __construct(
Parameter #0 [ <required> string $title ]
Parameter #1 [ <optional> int $level = 0 ]
)
Methods
Title::getTitle
predicates |
public |
public function getTitle(): string
Title::setTitle
predicates |
public |
public function setTitle(
Parameter #0 [ <required> string $title ]
): void
Title::getLevel
predicates |
public |
public function getLevel(): int
Title::setLevel
predicates |
public |
public function setLevel(
Parameter #0 [ <required> int $level ]
): void
Title::__toString
predicates |
public |
implements |
public function __toString(): string
Fri, 31 Mar 2023 13:22:46 +0000
TocTree
namespace |
bhenk\doc2rst\rst |
predicates |
Cloneable | Instantiable |
implements |
Constructor
TocTree::__construct
predicates |
public | constructor |
public function __construct(
Parameter #0 [ <optional> array $entries = [] ]
)
Methods
TocTree::isEmpty
predicates |
public |
public function isEmpty(): bool
TocTree::__toString
predicates |
public |
implements |
public function __toString(): string
TocTree::addEntry
predicates |
public |
public function addEntry(
Parameter #0 [ <required> string $link ]
Parameter #1 [ <optional> ?string $title = NULL ]
): void
TocTree::getEntries
predicates |
public |
public function getEntries(): array
TocTree::setEntries
predicates |
public |
public function setEntries(
Parameter #0 [ <required> array $entries ]
): void
TocTree::getMaxDepth
predicates |
public |
public function getMaxDepth(): int
TocTree::setMaxDepth
predicates |
public |
public function setMaxDepth(
Parameter #0 [ <required> int $max_depth ]
): void
TocTree::getCaption
predicates |
public |
public function getCaption(): ?string
TocTree::setCaption
predicates |
public |
public function setCaption(
Parameter #0 [ <required> ?string $caption ]
): void
TocTree::getName
predicates |
public |
public function getName(): ?string
TocTree::setName
predicates |
public |
public function setName(
Parameter #0 [ <required> ?string $name ]
): void
TocTree::isTitlesOnly
predicates |
public |
public function isTitlesOnly(): bool
TocTree::setTitlesOnly
predicates |
public |
public function setTitlesOnly(
Parameter #0 [ <required> bool $titles_only ]
): void
Fri, 31 Mar 2023 13:22:46 +0000
UnicodeDirective
namespace |
bhenk\doc2rst\rst |
predicates |
Cloneable | Instantiable |
implements |
Constructor
UnicodeDirective::__construct
predicates |
public | constructor |
public function __construct(
Parameter #0 [ <required> string $alias ]
Parameter #1 [ <required> string $code ]
Parameter #2 [ <optional> bool $trim = false ]
Parameter #3 [ <optional> ?string $comment = NULL ]
)
Methods
UnicodeDirective::__toString
predicates |
public |
implements |
public function __toString(): string
Fri, 31 Mar 2023 13:22:46 +0000
Fri, 31 Mar 2023 13:22:46 +0000
tag
Depends on |
Dependency invoked by |
---|---|
Classes representing tags, capable of rendering their information to reStructuredText
AbstractLinkTag
namespace |
bhenk\doc2rst\tag |
predicates |
Abstract |
implements |
|
extends |
|
hierarchy |
|
known subclasses |
Abstract tag that handles [URI|FQSEN] [description] syntax
syntax
@tag_name [URI|FQSEN] [description]
{@tag_name [URI|FQSEN] [description]}
Constants
AbstractLinkTag::TAG
predicates |
public |
Inherited from |
string(12) "@name_of_tag"
Constructor
AbstractLinkTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
AbstractLinkTag::render
predicates |
public |
implements |
Renders the tag
syntax
@tag_name [URI] [description]
{@tag_name [URI] [description]}
public function render(): void
AbstractLinkTag::__toString
predicates |
public |
implements |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
AbstractLinkTag::getUri
predicates |
public |
public function getUri(): ?string
AbstractLinkTag::setUri
predicates |
public |
public function setUri(
Parameter #0 [ <required> ?string $uri ]
): void
AbstractLinkTag::getDescription
predicates |
public |
public function getDescription(): ?string
AbstractLinkTag::setDescription
predicates |
public |
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
AbstractLinkTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
AbstractLinkTag::getTagName
predicates |
public | abstract |
implements |
|
inherited from |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public abstract function getTagName(): string
AbstractLinkTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
AbstractLinkTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
AbstractLinkTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
AbstractLinkTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
AbstractLinkTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
AbstractLinkTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
AbstractSimpleTag
namespace |
bhenk\doc2rst\tag |
predicates |
Abstract |
implements |
|
extends |
|
hierarchy |
|
known subclasses |
AbstractVersionTag | CopyrightTag | GeneratedTag | InheritdocTag | InternalTag | TodoTag |
Abstract tag that handles <description> syntax
syntax
@tag_name <description>
Constants
AbstractSimpleTag::TAG
predicates |
public |
Inherited from |
string(12) "@name_of_tag"
Constructor
AbstractSimpleTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
AbstractSimpleTag::render
predicates |
public |
implements |
Renders the description of simple tags
@inheritdoc
Render the $tag_string
Upon this command subclasses should parse the $tag_string.
@inheritdoc
from method AbstractTag::render
public function render(): void
AbstractSimpleTag::__toString
predicates |
public |
implements |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
AbstractSimpleTag::getDescription
predicates |
public |
Get the <description>
public function getDescription(): ?string
AbstractSimpleTag::setDescription
predicates |
public |
Set the <description>
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
AbstractSimpleTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
AbstractSimpleTag::getTagName
predicates |
public | abstract |
implements |
|
inherited from |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public abstract function getTagName(): string
AbstractSimpleTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
AbstractSimpleTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
AbstractSimpleTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
AbstractSimpleTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
AbstractSimpleTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
AbstractSimpleTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
AbstractTag
namespace |
bhenk\doc2rst\tag |
predicates |
Abstract |
implements |
|
known subclasses |
AbstractLinkTag | AbstractSimpleTag | ApiTag | AuthorTag | PackageTag |
Abstract base class for tags
Constants
AbstractTag::TAG
predicates |
public |
string(12) "@name_of_tag"
Constructor
AbstractTag::__construct
predicates |
public | constructor |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
AbstractTag::render
predicates |
protected | abstract |
Render the $tag_string
Upon this command subclasses should parse the $tag_string.
protected abstract function render(): void
AbstractTag::getLine
predicates |
public |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
AbstractTag::getTagName
predicates |
public | abstract |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public abstract function getTagName(): string
AbstractTag::getDisplayName
predicates |
public |
implements |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
AbstractTag::isInline
predicates |
public |
implements |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
AbstractTag::getTagLength
predicates |
public |
implements |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
AbstractTag::getGroupWidth
predicates |
public |
implements |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
AbstractTag::setGroupWidth
predicates |
public |
implements |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
AbstractTag::toRst
predicates |
public |
implements |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
AbstractTag::__toString
predicates |
public | abstract |
public abstract function __toString(): string
Fri, 31 Mar 2023 13:22:46 +0000
AbstractTypeTag
namespace |
bhenk\doc2rst\tag |
predicates |
Abstract |
implements |
|
extends |
|
hierarchy |
|
known subclasses |
Abstract tag that handles <”Type”> [description] syntax
syntax
@tag_name <"Type"> [description]
Constants
AbstractTypeTag::TAG
predicates |
public |
Inherited from |
string(12) "@name_of_tag"
Constructor
AbstractTypeTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
AbstractTypeTag::render
predicates |
public |
implements |
Renders a typed tag
syntax
@tag_name <"Type"> [description]
public function render(): void
AbstractTypeTag::__toString
predicates |
public |
implements |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
AbstractTypeTag::getType
predicates |
public |
public function getType(): ?string
AbstractTypeTag::setType
predicates |
public |
public function setType(
Parameter #0 [ <required> ?string $type ]
): void
AbstractTypeTag::getUri
predicates |
public |
inherited from |
public function getUri(): ?string
AbstractTypeTag::setUri
predicates |
public |
inherited from |
public function setUri(
Parameter #0 [ <required> ?string $uri ]
): void
AbstractTypeTag::getDescription
predicates |
public |
inherited from |
public function getDescription(): ?string
AbstractTypeTag::setDescription
predicates |
public |
inherited from |
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
AbstractTypeTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
AbstractTypeTag::getTagName
predicates |
public | abstract |
implements |
|
inherited from |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public abstract function getTagName(): string
AbstractTypeTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
AbstractTypeTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
AbstractTypeTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
AbstractTypeTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
AbstractTypeTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
AbstractTypeTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
AbstractVersionTag
namespace |
bhenk\doc2rst\tag |
predicates |
Abstract |
implements |
|
extends |
|
hierarchy |
|
known subclasses |
Abstract tag that handles [<”Semantic Version”>] [<description>] syntax
syntax
@tag_name [<"Semantic Version">] [<description>]
Constants
AbstractVersionTag::TAG
predicates |
public |
Inherited from |
string(12) "@name_of_tag"
Constructor
AbstractVersionTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
AbstractVersionTag::render
predicates |
public |
implements |
Renders a versioned Tag
syntax
@tag_name [<"Semantic Version">] [<description>]
Renders [<”Semantic Version”>] as is, transforms inline PHPDoc tags in [<description>] to their reStructuredText representation.
@inheritdoc
Render the $tag_string
Upon this command subclasses should parse the $tag_string.
@inheritdoc
from method AbstractTag::render
public function render(): void
AbstractVersionTag::__toString
predicates |
public |
implements |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
AbstractVersionTag::getSemanticVersion
predicates |
public |
Get the [<”Semantic Version”>]
public function getSemanticVersion(): ?string
AbstractVersionTag::setSemanticVersion
predicates |
public |
Set the [<”Semantic Version”>]
public function setSemanticVersion(
Parameter #0 [ <required> string $semantic_version ]
): void
AbstractVersionTag::getDescription
predicates |
public |
inherited from |
Get the <description>
public function getDescription(): ?string
AbstractVersionTag::setDescription
predicates |
public |
inherited from |
Set the <description>
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
AbstractVersionTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
AbstractVersionTag::getTagName
predicates |
public | abstract |
implements |
|
inherited from |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public abstract function getTagName(): string
AbstractVersionTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
AbstractVersionTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
AbstractVersionTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
AbstractVersionTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
AbstractVersionTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
AbstractVersionTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
ApiTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
Represents the api tag
syntax
@api
see also
Constants
ApiTag::TAG
predicates |
public |
string(4) "@api"
Constructor
ApiTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
ApiTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
ApiTag::render
predicates |
public |
implements |
Renders the api tag
syntax
@api
public function render(): void
ApiTag::__toString
predicates |
public |
implements |
Returns a reStructuredText representation of the contents of this Tag
(which is always the empty string “”)
public function __toString(): string
ApiTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
ApiTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
ApiTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
ApiTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
ApiTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
ApiTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
ApiTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
CopyrightTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
Represents the copyright tag
syntax
@copyright <description>
see also
Constants
CopyrightTag::TAG
predicates |
public |
string(10) "@copyright"
Constructor
CopyrightTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
CopyrightTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
CopyrightTag::render
predicates |
public |
implements |
|
inherited from |
Renders the description of simple tags
@inheritdoc
Render the $tag_string
Upon this command subclasses should parse the $tag_string.
@inheritdoc
from method AbstractTag::render
public function render(): void
CopyrightTag::__toString
predicates |
public |
implements |
|
inherited from |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
CopyrightTag::getDescription
predicates |
public |
inherited from |
Get the <description>
public function getDescription(): ?string
CopyrightTag::setDescription
predicates |
public |
inherited from |
Set the <description>
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
CopyrightTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
CopyrightTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
CopyrightTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
CopyrightTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
CopyrightTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
CopyrightTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
CopyrightTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
DeprecatedTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
DeprecatedTag -> AbstractVersionTag -> AbstractSimpleTag -> AbstractTag |
Represents the deprecated tag
syntax
@deprecated [<"Semantic Version">] [<description>]
see also
Constants
DeprecatedTag::TAG
predicates |
public |
string(11) "@deprecated"
Constructor
DeprecatedTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
DeprecatedTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
DeprecatedTag::render
predicates |
public |
implements |
|
inherited from |
Renders a versioned Tag
syntax
@tag_name [<"Semantic Version">] [<description>]
Renders [<”Semantic Version”>] as is, transforms inline PHPDoc tags in [<description>] to their reStructuredText representation.
@inheritdoc
Render the $tag_string
Upon this command subclasses should parse the $tag_string.
@inheritdoc
from method AbstractTag::render
public function render(): void
DeprecatedTag::__toString
predicates |
public |
implements |
|
inherited from |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
DeprecatedTag::getSemanticVersion
predicates |
public |
inherited from |
Get the [<”Semantic Version”>]
public function getSemanticVersion(): ?string
DeprecatedTag::setSemanticVersion
predicates |
public |
inherited from |
Set the [<”Semantic Version”>]
public function setSemanticVersion(
Parameter #0 [ <required> string $semantic_version ]
): void
DeprecatedTag::getDescription
predicates |
public |
inherited from |
Get the <description>
public function getDescription(): ?string
DeprecatedTag::setDescription
predicates |
public |
inherited from |
Set the <description>
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
DeprecatedTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
DeprecatedTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
DeprecatedTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
DeprecatedTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
DeprecatedTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
DeprecatedTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
DeprecatedTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
GeneratedTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
Represents the generated tag
syntax
@generated [description]
see also
Constants
GeneratedTag::TAG
predicates |
public |
string(10) "@generated"
Constructor
GeneratedTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
GeneratedTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
GeneratedTag::render
predicates |
public |
implements |
|
inherited from |
Renders the description of simple tags
@inheritdoc
Render the $tag_string
Upon this command subclasses should parse the $tag_string.
@inheritdoc
from method AbstractTag::render
public function render(): void
GeneratedTag::__toString
predicates |
public |
implements |
|
inherited from |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
GeneratedTag::getDescription
predicates |
public |
inherited from |
Get the <description>
public function getDescription(): ?string
GeneratedTag::setDescription
predicates |
public |
inherited from |
Set the <description>
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
GeneratedTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
GeneratedTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
GeneratedTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
GeneratedTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
GeneratedTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
GeneratedTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
GeneratedTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
InheritdocTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
Represents the inheritdoc tag
syntax
@inheritdoc
{@inheritdoc}
see also
Constants
InheritdocTag::TAG
predicates |
public |
string(11) "@inheritdoc"
Constructor
InheritdocTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
InheritdocTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
InheritdocTag::__toString
predicates |
public |
implements |
Returns a reStructuredText representation of inherited PHPDoc
If no inherited PHPDoc can be found, returns a placeholder string.
public function __toString(): string
InheritdocTag::render
predicates |
public |
implements |
|
inherited from |
Renders the description of simple tags
@inheritdoc
Render the $tag_string
Upon this command subclasses should parse the $tag_string.
@inheritdoc
from method AbstractTag::render
public function render(): void
InheritdocTag::getDescription
predicates |
public |
inherited from |
Get the <description>
public function getDescription(): ?string
InheritdocTag::setDescription
predicates |
public |
inherited from |
Set the <description>
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
InheritdocTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
InheritdocTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
InheritdocTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
InheritdocTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
InheritdocTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
InheritdocTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
InheritdocTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
InternalTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
Represents the internal tag
syntax
@internal [description]
{@internal [description]}
see also
Constants
InternalTag::TAG
predicates |
public |
string(9) "@internal"
Constructor
InternalTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
InternalTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
InternalTag::render
predicates |
public |
implements |
|
inherited from |
Renders the description of simple tags
@inheritdoc
Render the $tag_string
Upon this command subclasses should parse the $tag_string.
@inheritdoc
from method AbstractTag::render
public function render(): void
InternalTag::__toString
predicates |
public |
implements |
|
inherited from |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
InternalTag::getDescription
predicates |
public |
inherited from |
Get the <description>
public function getDescription(): ?string
InternalTag::setDescription
predicates |
public |
inherited from |
Set the <description>
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
InternalTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
InternalTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
InternalTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
InternalTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
InternalTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
InternalTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
InternalTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
LicenseTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
Represents the license tag
syntax
@license [URI] [description]
Constants
LicenseTag::TAG
predicates |
public |
string(8) "@license"
Constructor
LicenseTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
LicenseTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
LicenseTag::render
predicates |
public |
implements |
|
inherited from |
Renders the tag
syntax
@tag_name [URI] [description]
{@tag_name [URI] [description]}
public function render(): void
LicenseTag::__toString
predicates |
public |
implements |
|
inherited from |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
LicenseTag::getUri
predicates |
public |
inherited from |
public function getUri(): ?string
LicenseTag::setUri
predicates |
public |
inherited from |
public function setUri(
Parameter #0 [ <required> ?string $uri ]
): void
LicenseTag::getDescription
predicates |
public |
inherited from |
public function getDescription(): ?string
LicenseTag::setDescription
predicates |
public |
inherited from |
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
LicenseTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
LicenseTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
LicenseTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
LicenseTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
LicenseTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
LicenseTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
LicenseTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
LinkTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
Represents the link tag
syntax
@link [URI] [description]
{@link [URI] [description]}
see also
Constants
LinkTag::TAG
predicates |
public |
string(5) "@link"
Constructor
LinkTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
LinkTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
LinkTag::render
predicates |
public |
implements |
|
inherited from |
Renders the tag
syntax
@tag_name [URI] [description]
{@tag_name [URI] [description]}
public function render(): void
LinkTag::__toString
predicates |
public |
implements |
|
inherited from |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
LinkTag::getUri
predicates |
public |
inherited from |
public function getUri(): ?string
LinkTag::setUri
predicates |
public |
inherited from |
public function setUri(
Parameter #0 [ <required> ?string $uri ]
): void
LinkTag::getDescription
predicates |
public |
inherited from |
public function getDescription(): ?string
LinkTag::setDescription
predicates |
public |
inherited from |
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
LinkTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
LinkTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
LinkTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
LinkTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
LinkTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
LinkTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
LinkTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
PackageTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
Represents the package tag
syntax
@package [level 1]\[level 2]\[etc.]
see also
Constants
PackageTag::TAG
predicates |
public |
string(8) "@package"
Constructor
PackageTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
PackageTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
PackageTag::render
predicates |
public |
implements |
Renders the package tag
syntax
@package [level 1]\[level 2]\[etc.]
public function render(): void
PackageTag::__toString
predicates |
public |
implements |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
PackageTag::getSubdivision
predicates |
public |
public function getSubdivision(): ?string
PackageTag::setSubdivision
predicates |
public |
public function setSubdivision(
Parameter #0 [ <required> ?string $subdivision ]
): void
PackageTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
PackageTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
PackageTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
PackageTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
PackageTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
PackageTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
PackageTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
ParamTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
ParamTag -> AbstractTypeTag -> AbstractLinkTag -> AbstractTag |
known subclasses |
Represents the param tag
syntax
@param ["Type"] $[name] [<description>]
see also
Constants
ParamTag::TAG
predicates |
public |
string(6) "@param"
Constructor
ParamTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
ParamTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
ParamTag::render
predicates |
public |
implements |
Renders a named type Tag
syntax
@tag_name ["Type"] $[name] [<description>]
public function render(): void
ParamTag::__toString
predicates |
public |
implements |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
ParamTag::getName
predicates |
public |
public function getName(): ?string
ParamTag::setName
predicates |
public |
public function setName(
Parameter #0 [ <required> ?string $name ]
): void
ParamTag::getType
predicates |
public |
inherited from |
public function getType(): ?string
ParamTag::setType
predicates |
public |
inherited from |
public function setType(
Parameter #0 [ <required> ?string $type ]
): void
ParamTag::getUri
predicates |
public |
inherited from |
public function getUri(): ?string
ParamTag::setUri
predicates |
public |
inherited from |
public function setUri(
Parameter #0 [ <required> ?string $uri ]
): void
ParamTag::getDescription
predicates |
public |
inherited from |
public function getDescription(): ?string
ParamTag::setDescription
predicates |
public |
inherited from |
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
ParamTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
ParamTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
ParamTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
ParamTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
ParamTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
ParamTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
ParamTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
ReturnTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
ReturnTag -> AbstractTypeTag -> AbstractLinkTag -> AbstractTag |
Represents the return tag
syntax
@return <"Type"> [description]
see also
Constants
ReturnTag::TAG
predicates |
public |
string(7) "@return"
Constructor
ReturnTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
ReturnTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
ReturnTag::render
predicates |
public |
implements |
|
inherited from |
Renders a typed tag
syntax
@tag_name <"Type"> [description]
public function render(): void
ReturnTag::__toString
predicates |
public |
implements |
|
inherited from |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
ReturnTag::getType
predicates |
public |
inherited from |
public function getType(): ?string
ReturnTag::setType
predicates |
public |
inherited from |
public function setType(
Parameter #0 [ <required> ?string $type ]
): void
ReturnTag::getUri
predicates |
public |
inherited from |
public function getUri(): ?string
ReturnTag::setUri
predicates |
public |
inherited from |
public function setUri(
Parameter #0 [ <required> ?string $uri ]
): void
ReturnTag::getDescription
predicates |
public |
inherited from |
public function getDescription(): ?string
ReturnTag::setDescription
predicates |
public |
inherited from |
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
ReturnTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
ReturnTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
ReturnTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
ReturnTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
ReturnTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
ReturnTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
ReturnTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
SeeTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
SeeTag -> AbstractLinkTag -> AbstractTag |
Represents the see tag
syntax
@see [URI | "FQSEN"] [<description>]
see also
Constants
SeeTag::TAG
predicates |
public |
string(4) "@see"
Constructor
SeeTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
SeeTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
SeeTag::render
predicates |
public |
implements |
|
inherited from |
Renders the tag
syntax
@tag_name [URI] [description]
{@tag_name [URI] [description]}
public function render(): void
SeeTag::__toString
predicates |
public |
implements |
|
inherited from |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
SeeTag::getUri
predicates |
public |
inherited from |
public function getUri(): ?string
SeeTag::setUri
predicates |
public |
inherited from |
public function setUri(
Parameter #0 [ <required> ?string $uri ]
): void
SeeTag::getDescription
predicates |
public |
inherited from |
public function getDescription(): ?string
SeeTag::setDescription
predicates |
public |
inherited from |
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
SeeTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
SeeTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
SeeTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
SeeTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
SeeTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
SeeTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
SeeTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
SinceTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
SinceTag -> AbstractVersionTag -> AbstractSimpleTag -> AbstractTag |
Represents the since tag
syntax
@since [<"Semantic Version">] [<description>]
see also
Constants
SinceTag::TAG
predicates |
public |
string(6) "@since"
Constructor
SinceTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
SinceTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
SinceTag::render
predicates |
public |
implements |
|
inherited from |
Renders a versioned Tag
syntax
@tag_name [<"Semantic Version">] [<description>]
Renders [<”Semantic Version”>] as is, transforms inline PHPDoc tags in [<description>] to their reStructuredText representation.
@inheritdoc
Render the $tag_string
Upon this command subclasses should parse the $tag_string.
@inheritdoc
from method AbstractTag::render
public function render(): void
SinceTag::__toString
predicates |
public |
implements |
|
inherited from |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
SinceTag::getSemanticVersion
predicates |
public |
inherited from |
Get the [<”Semantic Version”>]
public function getSemanticVersion(): ?string
SinceTag::setSemanticVersion
predicates |
public |
inherited from |
Set the [<”Semantic Version”>]
public function setSemanticVersion(
Parameter #0 [ <required> string $semantic_version ]
): void
SinceTag::getDescription
predicates |
public |
inherited from |
Get the <description>
public function getDescription(): ?string
SinceTag::setDescription
predicates |
public |
inherited from |
Set the <description>
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
SinceTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
SinceTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
SinceTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
SinceTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
SinceTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
SinceTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
SinceTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
TagFactory
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
Methods
TagFactory::getTagImplementation
predicates |
public | static |
public static function getTagImplementation(
Parameter #0 [ <required> string $tag ]
): TagInterface|string
Fri, 31 Mar 2023 13:22:46 +0000
TagInterface
namespace |
bhenk\doc2rst\tag |
predicates |
Abstract | Interface |
known implementations |
AbstractLinkTag | AbstractSimpleTag | AbstractTag | AbstractTypeTag | AbstractVersionTag | ApiTag | AuthorTag | CopyrightTag | DeprecatedTag | GeneratedTag | InheritdocTag | InternalTag | LicenseTag | LinkTag | PackageTag | ParamTag | ReturnTag | SeeTag | SinceTag | ThrowsTag | TodoTag | UsesTag | VarTag | VersionTag |
Methods
TagInterface::toRst
predicates |
public | abstract |
Express this Tag in reStructuredText
public abstract function toRst(): string
TagInterface::getTagName
predicates |
public | abstract |
Gets the tag-name of this Tag
public abstract function getTagName(): string
TagInterface::getDisplayName
predicates |
public | abstract |
Get the short version of this tagname, without the at-sign (@)
public abstract function getDisplayName(): string
TagInterface::isInline
predicates |
public | abstract |
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
public abstract function isInline(): bool
TagInterface::getTagLength
predicates |
public | abstract |
Get the length (in characters) of this tagname
public abstract function getTagLength(): int
TagInterface::getGroupWidth
predicates |
public | abstract |
Get the width (in characters) of the group in which this Tag will be displayed
public abstract function getGroupWidth(): int
TagInterface::setGroupWidth
predicates |
public | abstract |
Set the width (in characters) of the group in which this Tag will be displayed
public abstract function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
Fri, 31 Mar 2023 13:22:46 +0000
ThrowsTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
ThrowsTag -> AbstractTypeTag -> AbstractLinkTag -> AbstractTag |
Represents the throws tag
syntax
@throws ["Type"] [<description>]
see also
Constants
ThrowsTag::TAG
predicates |
public |
string(7) "@throws"
Constructor
ThrowsTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
ThrowsTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
ThrowsTag::render
predicates |
public |
implements |
|
inherited from |
Renders a typed tag
syntax
@tag_name <"Type"> [description]
public function render(): void
ThrowsTag::__toString
predicates |
public |
implements |
|
inherited from |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
ThrowsTag::getType
predicates |
public |
inherited from |
public function getType(): ?string
ThrowsTag::setType
predicates |
public |
inherited from |
public function setType(
Parameter #0 [ <required> ?string $type ]
): void
ThrowsTag::getUri
predicates |
public |
inherited from |
public function getUri(): ?string
ThrowsTag::setUri
predicates |
public |
inherited from |
public function setUri(
Parameter #0 [ <required> ?string $uri ]
): void
ThrowsTag::getDescription
predicates |
public |
inherited from |
public function getDescription(): ?string
ThrowsTag::setDescription
predicates |
public |
inherited from |
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
ThrowsTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
ThrowsTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
ThrowsTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
ThrowsTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
ThrowsTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
ThrowsTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
ThrowsTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
TodoTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
Represents the todo tag
syntax
@todo [description]
see also
Constants
TodoTag::TAG
predicates |
public |
string(5) "@todo"
Constructor
TodoTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
TodoTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
TodoTag::render
predicates |
public |
implements |
|
inherited from |
Renders the description of simple tags
@inheritdoc
Render the $tag_string
Upon this command subclasses should parse the $tag_string.
@inheritdoc
from method AbstractTag::render
public function render(): void
TodoTag::__toString
predicates |
public |
implements |
|
inherited from |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
TodoTag::getDescription
predicates |
public |
inherited from |
Get the <description>
public function getDescription(): ?string
TodoTag::setDescription
predicates |
public |
inherited from |
Set the <description>
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
TodoTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
TodoTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
TodoTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
TodoTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
TodoTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
TodoTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
TodoTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
UsesTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
UsesTag -> AbstractTypeTag -> AbstractLinkTag -> AbstractTag |
Represents the uses tag
syntax
@uses [file | "FQSEN"] [<description>]
see also
Constants
UsesTag::TAG
predicates |
public |
string(5) "@uses"
Constructor
UsesTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
UsesTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
UsesTag::render
predicates |
public |
implements |
|
inherited from |
Renders a typed tag
syntax
@tag_name <"Type"> [description]
public function render(): void
UsesTag::__toString
predicates |
public |
implements |
|
inherited from |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
UsesTag::getType
predicates |
public |
inherited from |
public function getType(): ?string
UsesTag::setType
predicates |
public |
inherited from |
public function setType(
Parameter #0 [ <required> ?string $type ]
): void
UsesTag::getUri
predicates |
public |
inherited from |
public function getUri(): ?string
UsesTag::setUri
predicates |
public |
inherited from |
public function setUri(
Parameter #0 [ <required> ?string $uri ]
): void
UsesTag::getDescription
predicates |
public |
inherited from |
public function getDescription(): ?string
UsesTag::setDescription
predicates |
public |
inherited from |
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
UsesTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
UsesTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
UsesTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
UsesTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
UsesTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
UsesTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
UsesTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
VarTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
VarTag -> ParamTag -> AbstractTypeTag -> AbstractLinkTag -> AbstractTag |
Represents the var tag
syntax
@var ["Type"] [element_name] [<description>]
see also
Constants
VarTag::TAG
predicates |
public |
string(4) "@var"
Constructor
VarTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
VarTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
VarTag::render
predicates |
public |
implements |
|
inherited from |
Renders a named type Tag
syntax
@tag_name ["Type"] $[name] [<description>]
public function render(): void
VarTag::__toString
predicates |
public |
implements |
|
inherited from |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
VarTag::getName
predicates |
public |
inherited from |
public function getName(): ?string
VarTag::setName
predicates |
public |
inherited from |
public function setName(
Parameter #0 [ <required> ?string $name ]
): void
VarTag::getType
predicates |
public |
inherited from |
public function getType(): ?string
VarTag::setType
predicates |
public |
inherited from |
public function setType(
Parameter #0 [ <required> ?string $type ]
): void
VarTag::getUri
predicates |
public |
inherited from |
public function getUri(): ?string
VarTag::setUri
predicates |
public |
inherited from |
public function setUri(
Parameter #0 [ <required> ?string $uri ]
): void
VarTag::getDescription
predicates |
public |
inherited from |
public function getDescription(): ?string
VarTag::setDescription
predicates |
public |
inherited from |
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
VarTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
VarTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
VarTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
VarTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
VarTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
VarTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
VarTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
VersionTag
namespace |
bhenk\doc2rst\tag |
predicates |
Cloneable | Instantiable |
implements |
|
extends |
|
hierarchy |
VersionTag -> AbstractVersionTag -> AbstractSimpleTag -> AbstractTag |
Represents the version tag
syntax
@version [<"Semantic Version">] [<description>]
see also
Constants
VersionTag::TAG
predicates |
public |
string(8) "@version"
Constructor
VersionTag::__construct
predicates |
public | constructor |
inherited from |
Construct a new Tag
The $tag_string should include the at-symbol @
, tag name and possibly curly braces.
The string should follow the syntax of the specific Tag being constructed.
public function __construct(
Parameter #0 [ <optional> ?string $tag_string = '' ]
)
Methods
VersionTag::getTagName
predicates |
public |
implements |
@inheritdoc
Gets the tag-name of this Tag
@inheritdoc
from method TagInterface::getTagName
public function getTagName(): string
VersionTag::render
predicates |
public |
implements |
|
inherited from |
Renders a versioned Tag
syntax
@tag_name [<"Semantic Version">] [<description>]
Renders [<”Semantic Version”>] as is, transforms inline PHPDoc tags in [<description>] to their reStructuredText representation.
@inheritdoc
Render the $tag_string
Upon this command subclasses should parse the $tag_string.
@inheritdoc
from method AbstractTag::render
public function render(): void
VersionTag::__toString
predicates |
public |
implements |
|
inherited from |
Returns a reStructuredText representation of the contents of this Tag
public function __toString(): string
VersionTag::getSemanticVersion
predicates |
public |
inherited from |
Get the [<”Semantic Version”>]
public function getSemanticVersion(): ?string
VersionTag::setSemanticVersion
predicates |
public |
inherited from |
Set the [<”Semantic Version”>]
public function setSemanticVersion(
Parameter #0 [ <required> string $semantic_version ]
): void
VersionTag::getDescription
predicates |
public |
inherited from |
Get the <description>
public function getDescription(): ?string
VersionTag::setDescription
predicates |
public |
inherited from |
Set the <description>
public function setDescription(
Parameter #0 [ <required> ?string $description ]
): void
VersionTag::getLine
predicates |
public |
inherited from |
Get the content of the $tag_string without the tag name and curly braces
public function getLine(): string
VersionTag::getDisplayName
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the short version of this tagname, without the at-sign (@)
@inheritdoc
from method TagInterface::getDisplayName
public function getDisplayName(): string
VersionTag::isInline
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Is this an inline tag
Is this an inline tag (with curly braces) or does this tag appear at the start of a line.
@inheritdoc
from method TagInterface::isInline
public function isInline(): bool
VersionTag::getTagLength
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the length (in characters) of this tagname
@inheritdoc
from method TagInterface::getTagLength
public function getTagLength(): int
VersionTag::getGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Get the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::getGroupWidth
public function getGroupWidth(): int
VersionTag::setGroupWidth
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Set the width (in characters) of the group in which this Tag will be displayed
@inheritdoc
from method TagInterface::setGroupWidth
public function setGroupWidth(
Parameter #0 [ <required> int $max_width ]
): void
VersionTag::toRst
predicates |
public |
implements |
|
inherited from |
@inheritdoc
Express this Tag in reStructuredText
@inheritdoc
from method TagInterface::toRst
public function toRst(): string
Fri, 31 Mar 2023 13:22:46 +0000
Fri, 31 Mar 2023 13:22:46 +0000
work
Depends on |
Dependency invoked by |
---|---|
Naive worker classes
Linker
namespace |
bhenk\doc2rst\work |
predicates |
Cloneable | Instantiable |
Methods
Linker::getLink
predicates |
public | static |
public static function getLink(
Parameter #0 [ <required> ?string $search ]
Parameter #1 [ <optional> ?string $description = NULL ]
): string
Linker::tryCreateLink
predicates |
public | static |
public static function tryCreateLink(
Parameter #0 [ <required> string $uri_type ]
Parameter #1 [ <optional> ?string $description = NULL ]
): string
Linker::createLink
predicates |
public | static |
public static function createLink(
Parameter #0 [ <required> string $uri ]
Parameter #1 [ <required> ?string $desc ]
): string|bool
Linker::findInParameters
predicates |
public | static |
public static function findInParameters(
Parameter #0 [ <required> string $type ]
): string|bool
Linker::createTypeLink
predicates |
public | static |
public static function createTypeLink(
Parameter #0 [ <required> string $type ]
Parameter #1 [ <optional> ?string $description = NULL ]
): string
Linker::findFQCN
predicates |
public | static |
public static function findFQCN(
Parameter #0 [ <required> string $type ]
): string
Fri, 31 Mar 2023 13:22:46 +0000
PackageAnalyser
namespace |
bhenk\doc2rst\work |
predicates |
Cloneable | Instantiable |
Analyse interdependencies of packages
Methods
PackageAnalyser::addParser
predicates |
public |
public function addParser(
Parameter #0 [ <required> bhenk\doc2rst\work\PhpParser $parser ]
Parameter #1 [ <required> string $fqn ]
): void
PackageAnalyser::toRst
predicates |
public |
public function toRst(): Stringable|string
PackageAnalyser::getUses
predicates |
public |
public function getUses(): array
Fri, 31 Mar 2023 13:22:46 +0000
PhpParser
namespace |
bhenk\doc2rst\work |
predicates |
Cloneable | Instantiable |
Constructor
PhpParser::__construct
predicates |
public | constructor |
public function __construct()
Methods
PhpParser::parseFile
predicates |
public |
public function parseFile(
Parameter #0 [ <required> string $path ]
): void
PhpParser::parseString
predicates |
public |
public function parseString(
Parameter #0 [ <required> string $contents ]
): void
PhpParser::parseTokens
predicates |
public |
public function parseTokens(
Parameter #0 [ <required> array $tokens ]
): void
PhpParser::getFilename
predicates |
public |
public function getFilename(): ?string
PhpParser::getShortName
predicates |
public |
public function getShortName(): ?string
PhpParser::isInitialized
predicates |
public |
public function isInitialized(): bool
PhpParser::hasInlineHtml
predicates |
public |
public function hasInlineHtml(): bool
PhpParser::isPhp
predicates |
public |
public function isPhp(): bool
PhpParser::isPlainPhpFile
predicates |
public |
public function isPlainPhpFile(): bool
PhpParser::isClassFile
predicates |
public |
public function isClassFile(): bool
PhpParser::isInterfaceFile
predicates |
public |
public function isInterfaceFile(): bool
PhpParser::isTraitFile
predicates |
public |
public function isTraitFile(): bool
PhpParser::isEnumFile
predicates |
public |
public function isEnumFile(): bool
PhpParser::getFQName
predicates |
public |
public function getFQName(): ?string
PhpParser::getNamespace
predicates |
public |
public function getNamespace(): ?Struct
PhpParser::getUses
predicates |
public |
public function getUses(): array
PhpParser::getClass
predicates |
public |
public function getClass(): ?Struct
PhpParser::getInterface
predicates |
public |
public function getInterface(): ?Struct
PhpParser::getTrait
predicates |
public |
public function getTrait(): ?Struct
PhpParser::getEnum
predicates |
public |
public function getEnum(): ?Struct
PhpParser::getConstants
predicates |
public |
public function getConstants(): array
PhpParser::getVariables
predicates |
public |
public function getVariables(): array
PhpParser::getFunctions
predicates |
public |
public function getFunctions(): array
PhpParser::getReturn
predicates |
public |
public function getReturn(): ?Struct
Fri, 31 Mar 2023 13:22:46 +0000
ProcessState
namespace |
bhenk\doc2rst\work |
predicates |
Cloneable | Instantiable |
Methods
ProcessState::getCurrentParser
predicates |
public | static |
public static function getCurrentParser(): ?PhpParser
ProcessState::setCurrentParser
predicates |
public | static |
public static function setCurrentParser(
Parameter #0 [ <required> ?bhenk\doc2rst\work\PhpParser $current_parser ]
): void
ProcessState::getCurrentClass
predicates |
public | static |
public static function getCurrentClass(): ?ReflectionClass
ProcessState::setCurrentClass
predicates |
public | static |
public static function setCurrentClass(
Parameter #0 [ <required> ?ReflectionClass $current_class ]
): void
ProcessState::getCurrentMethod
predicates |
public | static |
public static function getCurrentMethod(): ?ReflectionMethod
ProcessState::setCurrentMethod
predicates |
public | static |
public static function setCurrentMethod(
Parameter #0 [ <required> ?ReflectionMethod $current_method ]
): void
ProcessState::getCurrentMethodStart
predicates |
public | static |
public static function getCurrentMethodStart(): int|bool
ProcessState::getCurrentMethodEnd
predicates |
public | static |
public static function getCurrentMethodEnd(): int|bool
ProcessState::getCurrentConstant
predicates |
public | static |
public static function getCurrentConstant(): ?ReflectionClassConstant
ProcessState::setCurrentConstant
predicates |
public | static |
public static function setCurrentConstant(
Parameter #0 [ <required> ?ReflectionClassConstant $current_constant ]
): void
ProcessState::getPointer
predicates |
public | static |
public static function getPointer(
Parameter #0 [ <optional> bool $file_prefix = true ]
): string
Fri, 31 Mar 2023 13:22:46 +0000
Struct
namespace |
bhenk\doc2rst\work |
predicates |
Cloneable | Instantiable |
Constructor
Struct::__construct
predicates |
public | constructor |
public function __construct(
Parameter #0 [ <required> int $line ]
Parameter #1 [ <optional> ?string $name = NULL ]
Parameter #2 [ <optional> mixed $value = NULL ]
Parameter #3 [ <optional> int $doc_comment_start = -1 ]
Parameter #4 [ <optional> ?string $doc_comment = NULL ]
)
Methods
Struct::getLine
predicates |
public |
public function getLine(): int
Struct::getName
predicates |
public |
public function getName(): string
Struct::getValue
predicates |
public |
public function getValue(): mixed
Struct::getType
predicates |
public |
public function getType(): string
Struct::getDocComment
predicates |
public |
public function getDocComment(): ?string
Struct::getDocCommentStart
predicates |
public |
public function getDocCommentStart(): int
Struct::getDocCommentEnd
predicates |
public |
public function getDocCommentEnd(): int
Struct::getDocCommentDistance
predicates |
public |
public function getDocCommentDistance(): int
Fri, 31 Mar 2023 13:22:46 +0000
TypeLinker
namespace |
bhenk\doc2rst\work |
predicates |
Cloneable | Instantiable |
Create links and references to types
Constants
TypeLinker::PHP_CLASS_NET
predicates |
public |
string(35) "https://www.php.net/manual/en/class"
TypeLinker::PHP_METHOD_NET
predicates |
public |
string(29) "https://www.php.net/manual/en"
TypeLinker::SEARCH_ENGINE
predicates |
public |
string(32) "https://www.google.com/search?q="
Methods
TypeLinker::resolveReflectionType
predicates |
public | static |
Resolve ReflectionTypes to their representation as reStructuredText links and references
This method handles ReflectionNamedType and ReflectionUnionType.
public static function resolveReflectionType(
Parameter #0 [ <required> ReflectionType $reflectionType ]
): string
TypeLinker::resolveMultipleFQCN
predicates |
public | static |
Resolve multiple types to their representation as reStructuredText links and references
The array $types can consist of strings (fully qualified), ReflectionClass, ReflectionMethod and ReflectionClassConstant.
public static function resolveMultipleFQCN(
Parameter #0 [ <required> array $types ]
): array
TypeLinker::resolveFQCN
predicates |
public | static |
Resolve a type to its representation as reStructuredText link or reference
Strings given as $namedType can still contain allows null (?) and the or (string|int) symbol. Strings should be fully qualified (i.e. namespace\class)
public static function resolveFQCN(
Parameter #0 [ <required> ReflectionClass|string $namedType ]
Parameter #1 [ <optional> ReflectionMethod|ReflectionClassConstant|string|null $member = NULL ]
Parameter #2 [ <optional> ?string $description = NULL ]
): string
TypeLinker::createDocumentedClassReference
predicates |
public | static |
Try to establish a reference to a type that’s being documented
public static function createDocumentedClassReference(
Parameter #0 [ <required> ReflectionNamedType|ReflectionClass|string $namedType ]
Parameter #1 [ <optional> ReflectionMethod|ReflectionClassConstant|string|null $member = NULL ]
Parameter #2 [ <optional> ?string $description = NULL ]
): string|bool
TypeLinker::createInternalClassLink
predicates |
public | static |
Try to establish a link to a PHP-type
public static function createInternalClassLink(
Parameter #0 [ <required> ReflectionNamedType|ReflectionClass|string $namedType ]
Parameter #1 [ <optional> ReflectionMethod|ReflectionClassConstant|string|null $member = NULL ]
): string|bool
TypeLinker::createUserProvidedLink
predicates |
public | static |
Try to establish a link, based on a user provided mapping
see also
public static function createUserProvidedLink(
Parameter #0 [ <required> ReflectionNamedType|ReflectionClass|string $namedType ]
Parameter #1 [ <optional> ReflectionMethod|ReflectionClassConstant|string|null $member = NULL ]
): string|bool
TypeLinker::createSourceLink
predicates |
public | static |
Try to establish a file:// type link to a source-file
see also
public static function createSourceLink(
Parameter #0 [ <required> ReflectionNamedType|ReflectionClass|string $namedType ]
Parameter #1 [ <optional> ReflectionMethod|ReflectionClassConstant|string|null $member = NULL ]
): string|bool
TypeLinker::createSearchEngineLink
predicates |
public | static |
Try and throw a type at a search engine
see also
public static function createSearchEngineLink(
Parameter #0 [ <required> ReflectionNamedType|ReflectionClass|string $namedType ]
Parameter #1 [ <optional> ReflectionMethod|ReflectionClassConstant|string|null $member = NULL ]
): string|bool
Fri, 31 Mar 2023 13:22:46 +0000
Fri, 31 Mar 2023 13:22:46 +0000
Fri, 31 Mar 2023 13:22:46 +0000
Glossary
- application_root
Configuration option. Absolute path to the source directory, usually indicated with names like src or application.
see also
- api_directory
Configuration option. Absolute path to the directory for api-documentation. doc2rst will populate this directory with generated rst-files.
see also
- bootstrap_file
Configuration option. File needed to be able to load your classes. When using composer can be as simple as
<?php require_once "path/to/your/vendor/autoload.php";
- d2r-conf.php
Configuration file. This file, with suggestions for configuration, will be placed in the doc_root directory after running ProcessManager::quickStart.
see also
RC for detailed information about configuration options.- d2r-order.php
Configuration file. This file, with suggestions for configuration, will be placed in the doc_root directory after running ProcessManager::quickStart.
- d2r-styles.txt
Configuration file. This file holds some style information and will be ingested at the top of each generated rst-document. It will be placed in the doc_root directory after running ProcessManager::quickStart.
- doc2rst.phar
Executable phar-file. Convenient way to generate reStructuredText files for your project documentation. Download doc2rst.phar from github releases. Install preferably in your project root folder. On a commandline execute
$ ./doc2rst.phar -h
for help on options and arguments.
- doc_root
Configuration option. Absolute path to the directory for documentation aka docs.
see also
- package documentation page
For each directory encountered in the source tree a package documentation file will be generated. The contents of any package.rst file found in this directory will be integrated in the package documentation page. It further displays links to classes, php-files and/or packages found in this directory. If files, other than php-files, are made downloadable the package documentation page will have download links to these files.
- package.rst
File in a source directory in reStructuredText format. If such a file is encountered it will be included in the package documentation page. A package.rst file can be as simple as carrying one line: The summary of the package, describing in short the purpose of the package.
Hint
It is also possible to add individual files to the downloads section of the package documentation page. In order to accomplish this just add an entry
.. download {file_name}
on a new line to the package.rst file of that package.
- quickstart
Doc2rst run mode that initiates configuration files in the doc_root folder, scans the source tree and does best guesses for configuration options. In this mode doc2rst will not generate reStructuredText files. Run quickstart with doc2rst.phar in your project root folder:
$ ./doc2rst.phar -q ./docs
see also
- run
Doc2rst run mode wherein the actual work is done: generating documentation from your source tree. Run with doc2rst.phar in your project root folder:
$ ./doc2rst.phar -r ./docs
see also
- vendor_directory
Configuration option. Absolute path to the directory that is usually one directory further than the application_root or source directory.
see also