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

Copyright © 2023 by henk van den berg
License: Apache 2.0
Version: 1.0.1

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:

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.

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”:

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:

api-docs

doc2rst

Packages and classes to transform PHPDocComments to reStructuredText

Copyright © 2023 by henk van den berg
License: Apache 2.0
Version: 1.0.1
package dependencies

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

Stringable

known subclasses

CodeBlockFormatter | RestructuredTextFormatter

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
param string $line - line to format
return bool - true if more lines are welcome, false otherwise

AbstractFormatter::addLine

predicates

protected

Add a line to the resulting block

protected function addLine(
      Parameter #0 [ <required> Stringable|string $line ]
 ): void
param Stringable | string $line - the line to add
return void

AbstractFormatter::__toString

predicates

public

implements

Stringable::__toString

Returns a reStructuredText representation of the contents of the block

public function __toString(): string
return string - reStructuredText representation of the contents

AbstractFormatter::getLineCount

predicates

protected

protected function getLineCount(): int
return int

AbstractFormatter::increaseLineCount

predicates

protected

protected function increaseLineCount(): int
return int

Fri, 31 Mar 2023 13:22:46 +0000

CodeBlockFormatter

namespace

bhenk\doc2rst\format

predicates

Cloneable | Instantiable

implements

Stringable

extends

AbstractFormatter

hierarchy

CodeBlockFormatter -> AbstractFormatter

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

AbstractFormatter::handleLine

@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.

param string $line - line to format
return bool - true if more lines are welcome, false otherwise

@inheritdoc from method AbstractFormatter::handleLine

public function handleLine(
      Parameter #0 [ <required> string $line ]
 ): bool
param string $line - line of a code block
return bool - true as long as second and following lines do not start with 3 tics

CodeBlockFormatter::addLine

predicates

protected

inherited from

AbstractFormatter::addLine

Add a line to the resulting block

protected function addLine(
      Parameter #0 [ <required> Stringable|string $line ]
 ): void
param Stringable | string $line - the line to add
return void

CodeBlockFormatter::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractFormatter::__toString

Returns a reStructuredText representation of the contents of the block

public function __toString(): string
return string - reStructuredText representation of the contents

CodeBlockFormatter::getLineCount

predicates

protected

inherited from

AbstractFormatter::getLineCount

protected function getLineCount(): int
return int

CodeBlockFormatter::increaseLineCount

predicates

protected

inherited from

AbstractFormatter::increaseLineCount

protected function increaseLineCount(): int
return int

Fri, 31 Mar 2023 13:22:46 +0000

RestructuredTextFormatter

namespace

bhenk\doc2rst\format

predicates

Cloneable | Instantiable

implements

Stringable

extends

AbstractFormatter

hierarchy

RestructuredTextFormatter -> AbstractFormatter

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::

   &param ["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

AbstractFormatter::handleLine

@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.

param string $line - line to format
return bool - true if more lines are welcome, false otherwise

@inheritdoc from method AbstractFormatter::handleLine

public function handleLine(
      Parameter #0 [ <required> string $line ]
 ): bool
param string $line - line of a code block
return bool - true as long second and following lines do not start with 3 tics

RestructuredTextFormatter::addLine

predicates

protected

inherited from

AbstractFormatter::addLine

Add a line to the resulting block

protected function addLine(
      Parameter #0 [ <required> Stringable|string $line ]
 ): void
param Stringable | string $line - the line to add
return void

RestructuredTextFormatter::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractFormatter::__toString

Returns a reStructuredText representation of the contents of the block

public function __toString(): string
return string - reStructuredText representation of the contents

RestructuredTextFormatter::getLineCount

predicates

protected

inherited from

AbstractFormatter::getLineCount

protected function getLineCount(): int
return int

RestructuredTextFormatter::increaseLineCount

predicates

protected

inherited from

AbstractFormatter::increaseLineCount

protected function increaseLineCount(): int
return 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

ContainerInterface | Stringable

known subclasses

RunConfiguration

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 param $id or null if it does not exist

public static abstract function enumForName(
      Parameter #0 [ <required> string $id ]
 ): ?UnitEnum
param string $id - enum name
return ?UnitEnum - enum case with the given param $id or null

AbstractStaticContainer::get

predicates

public

implements

ContainerInterface::get

@inheritdoc

Finds an entry of the container by its identifier and returns it

param string $id - Identifier of the entry to look for.
return mixed - Entry.
throws NotFoundExceptionInterface - No entry was found for this identifier.
throws ContainerExceptionInterface - Error while retrieving the entry.

@inheritdoc from method ContainerInterface::get

public function get(
      Parameter #0 [ <required> string $id ]
 ): mixed
param string $id
return mixed

AbstractStaticContainer::has

predicates

public

implements

ContainerInterface::has

@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.

param string $id - Identifier of the entry to look for.
return bool

@inheritdoc from method ContainerInterface::has

public function has(
      Parameter #0 [ <required> string $id ]
 ): bool
param string $id
return bool

AbstractStaticContainer::__toString

predicates

public

implements

Stringable::__toString

Returns a string representation of this container

public function __toString(): string
return 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
param array $configuration
return void
throws ContainerException - if array in param $configuration not correct

AbstractStaticContainer::toArray

predicates

public | static

Returns an array representing the container

public static function toArray(): array
return array - array representing the container

AbstractStaticContainer::reset

predicates

public | static

Reset the container to a neutral state (not necessarily to its original state)

public static function reset(): array
return array - representing the neutral state

AbstractStaticContainer::getMethodName

predicates

public | static

Return the method name part corresponding to the given param $id

Input of snake_like_name, output CamelCaseName:

foo_bar_name -> FooBarName
public static function getMethodName(
      Parameter #0 [ <required> string $id ]
 ): string
param string $id - snake_like_name
return string - CamelCaseName

Fri, 31 Mar 2023 13:22:46 +0000

ContainerException

namespace

bhenk\doc2rst\globals

predicates

Instantiable

implements

Stringable | Throwable | ContainerExceptionInterface

extends

Exception

hierarchy

ContainerException -> Exception

@inheritdoc

Base interface representing a generic exception in a container

@inheritdoc from interface ContainerExceptionInterface


Constructor
ContainerException::__construct

predicates

public | constructor

inherited from

Exception::__construct

public function __construct(
      Parameter #0 [ <optional> string $message = "" ]
      Parameter #1 [ <optional> int $code = 0 ]
      Parameter #2 [ <optional> ?Throwable $previous = null ]
 )
param string $message
param int $code
param ?Throwable $previous

Methods
ContainerException::__wakeup

predicates

public

inherited from

Exception::__wakeup

public function __wakeup()

ContainerException::getMessage

predicates

public | final

implements

Throwable::getMessage

inherited from

Exception::getMessage

public final function getMessage(): string
return string

ContainerException::getCode

predicates

public | final

implements

Throwable::getCode

inherited from

Exception::getCode

public final function getCode()

ContainerException::getFile

predicates

public | final

implements

Throwable::getFile

inherited from

Exception::getFile

public final function getFile(): string
return string

ContainerException::getLine

predicates

public | final

implements

Throwable::getLine

inherited from

Exception::getLine

public final function getLine(): int
return int

ContainerException::getTrace

predicates

public | final

implements

Throwable::getTrace

inherited from

Exception::getTrace

public final function getTrace(): array
return array

ContainerException::getPrevious

predicates

public | final

implements

Throwable::getPrevious

inherited from

Exception::getPrevious

public final function getPrevious(): ?Throwable
return ?Throwable

ContainerException::getTraceAsString

predicates

public | final

implements

Throwable::getTraceAsString

inherited from

Exception::getTraceAsString

public final function getTraceAsString(): string
return string

ContainerException::__toString

predicates

public

implements

Stringable::__toString

inherited from

Exception::__toString

public function __toString(): string
return 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

package d2r


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
return string

D2R::getCommentOrder

predicates

public | static

public static function getCommentOrder(): array
return array

D2R::getTagStyle

predicates

public | static

public static function getTagStyle(
      Parameter #0 [ <required> string $tag_name ]
 ): string
param string $tag_name
return string

D2R::getCommentOrderContents

predicates

public | static

public static function getCommentOrderContents(): string
return string

D2R::getInternalOrderFilename

predicates

public | static

public static function getInternalOrderFilename(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

DCO

namespace

bhenk\doc2rst\globals

predicates

Final | Enum

implements

UnitEnum | BackedEnum


Constants
DCO::api

predicates

public | enum case

enum(bhenk\doc2rst\globals\DCO::api)

DCO::author

predicates

public | enum case

enum(bhenk\doc2rst\globals\DCO::author)

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::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

UnitEnum::cases

public static function cases(): array
return array

DCO::from

predicates

public | static

implements

BackedEnum::from

public static function from(
      Parameter #0 [ <required> string|int $value ]
 ): static
param string | int $value
return static

DCO::tryFrom

predicates

public | static

implements

BackedEnum::tryFrom

public static function tryFrom(
      Parameter #0 [ <required> string|int $value ]
 ): ?static
param string | int $value
return ?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
return bool

DocState::setPreRun

predicates

public | static

public static function setPreRun(
      Parameter #0 [ <required> bool $preRun ]
 ): void
param bool $preRun
return void

DocState::addAbsoluteFile

predicates

public | static

public static function addAbsoluteFile(
      Parameter #0 [ <required> string $abs_file ]
 ): void
param string $abs_file
return void

DocState::addAbsoluteDir

predicates

public | static

public static function addAbsoluteDir(
      Parameter #0 [ <required> string $abs_dir ]
 ): void
param string $abs_dir
return void

DocState::getHash

predicates

public | static

public static function getHash(
      Parameter #0 [ <required> string $filename ]
 ): string
param string $filename
return string

DocState::getPreRunFiles

predicates

public | static

public static function getPreRunFiles(): array
return array

DocState::setPreRunFiles

predicates

public | static

public static function setPreRunFiles(
      Parameter #0 [ <required> array $preRunFiles ]
 ): void
param array $preRunFiles
return void

DocState::getPreRunDirs

predicates

public | static

public static function getPreRunDirs(): array
return array

DocState::setPreRunDirs

predicates

public | static

public static function setPreRunDirs(
      Parameter #0 [ <required> array $preRunDirs ]
 ): void
param array $preRunDirs
return void

DocState::getPostRunFiles

predicates

public | static

public static function getPostRunFiles(): array
return array

DocState::setPostRunFiles

predicates

public | static

public static function setPostRunFiles(
      Parameter #0 [ <required> array $postRunFiles ]
 ): void
param array $postRunFiles
return void

DocState::getPostRunDirs

predicates

public | static

public static function getPostRunDirs(): array
return array

DocState::setPostRunDirs

predicates

public | static

public static function setPostRunDirs(
      Parameter #0 [ <required> array $postRunDirs ]
 ): void
param array $postRunDirs
return 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

Exception

hierarchy

NotFoundException -> Exception

@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

Exception::__construct

public function __construct(
      Parameter #0 [ <optional> string $message = "" ]
      Parameter #1 [ <optional> int $code = 0 ]
      Parameter #2 [ <optional> ?Throwable $previous = null ]
 )
param string $message
param int $code
param ?Throwable $previous

Methods
NotFoundException::__wakeup

predicates

public

inherited from

Exception::__wakeup

public function __wakeup()

NotFoundException::getMessage

predicates

public | final

implements

Throwable::getMessage

inherited from

Exception::getMessage

public final function getMessage(): string
return string

NotFoundException::getCode

predicates

public | final

implements

Throwable::getCode

inherited from

Exception::getCode

public final function getCode()

NotFoundException::getFile

predicates

public | final

implements

Throwable::getFile

inherited from

Exception::getFile

public final function getFile(): string
return string

NotFoundException::getLine

predicates

public | final

implements

Throwable::getLine

inherited from

Exception::getLine

public final function getLine(): int
return int

NotFoundException::getTrace

predicates

public | final

implements

Throwable::getTrace

inherited from

Exception::getTrace

public final function getTrace(): array
return array

NotFoundException::getPrevious

predicates

public | final

implements

Throwable::getPrevious

inherited from

Exception::getPrevious

public final function getPrevious(): ?Throwable
return ?Throwable

NotFoundException::getTraceAsString

predicates

public | final

implements

Throwable::getTraceAsString

inherited from

Exception::getTraceAsString

public final function getTraceAsString(): string
return string

NotFoundException::__toString

predicates

public

implements

Stringable::__toString

inherited from

Exception::__toString

public function __toString(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

RC

namespace

bhenk\doc2rst\globals

predicates

Final | Enum

implements

UnitEnum

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

toctree maxdepth

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)

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::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
param string $name
return ?RC

RC::cases

predicates

public | static

implements

UnitEnum::cases

public static function cases(): array
return array

Fri, 31 Mar 2023 13:22:46 +0000

RunConfiguration

namespace

bhenk\doc2rst\globals

predicates

Cloneable | Instantiable

implements

Stringable | ContainerInterface

extends

AbstractStaticContainer

hierarchy

RunConfiguration -> AbstractStaticContainer

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

AbstractStaticContainer::enumForName

Gets the RC-enum case for the corresponding RC-enum name

@inheritdoc

Returns the enum case for the given param $id or null if it does not exist

param string $id - enum name
return UnitEnum | null - enum case with the given param $id or null

@inheritdoc from method AbstractStaticContainer::enumForName

uses RC
public static function enumForName(
      Parameter #0 [ <required> string $id ]
 ): ?UnitEnum
param string $id - one of the names of enum cases in RC
return ?UnitEnum - the corresponding enum case or null if param $id not an RC-name

RunConfiguration::reset

predicates

public | static

implements

AbstractStaticContainer::reset

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)

return array - representing the neutral 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
return array - the configuration as an array

RunConfiguration::toString

predicates

public | static

public static function toString(): string
return string

RunConfiguration::getApplicationRoot

predicates

public | static

public static function getApplicationRoot(): ?string
return ?string

RunConfiguration::setApplicationRoot

predicates

public | static

public static function setApplicationRoot(
      Parameter #0 [ <required> ?string $application_root ]
 ): void
param ?string $application_root
return void

RunConfiguration::getVendorDirectory

predicates

public | static

public static function getVendorDirectory(): ?string
return ?string

RunConfiguration::setVendorDirectory

predicates

public | static

public static function setVendorDirectory(
      Parameter #0 [ <required> ?string $vendor_directory ]
 ): void
param ?string $vendor_directory
return void

RunConfiguration::getBootstrapFile

predicates

public | static

public static function getBootstrapFile(): ?string
return ?string

RunConfiguration::setBootstrapFile

predicates

public | static

public static function setBootstrapFile(
      Parameter #0 [ <required> ?string $bootstrap_file ]
 ): void
param ?string $bootstrap_file
return void

RunConfiguration::getDocRoot

predicates

public | static

public static function getDocRoot(): ?string
return ?string

RunConfiguration::setDocRoot

predicates

public | static

public static function setDocRoot(
      Parameter #0 [ <required> ?string $doc_root ]
 ): void
param ?string $doc_root
return void

RunConfiguration::getApiDirectory

predicates

public | static

public static function getApiDirectory(): ?string
return ?string

RunConfiguration::setApiDirectory

predicates

public | static

public static function setApiDirectory(
      Parameter #0 [ <required> ?string $api_directory ]
 ): void
param ?string $api_directory
return void

RunConfiguration::getShowVisibility

predicates

public | static

public static function getShowVisibility(): int
return int

RunConfiguration::setShowVisibility

predicates

public | static

public static function setShowVisibility(
      Parameter #0 [ <required> int $visibility ]
 ): void
param int $visibility
return void

RunConfiguration::getLogLevel

predicates

public | static

public static function getLogLevel(): ?int
return ?int

RunConfiguration::setLogLevel

predicates

public | static

public static function setLogLevel(
      Parameter #0 [ <required> int $log_level ]
 ): void
param int $log_level
return void

RunConfiguration::getExcludes

predicates

public | static

public static function getExcludes(): array
return array

RunConfiguration::setExcludes

predicates

public | static

public static function setExcludes(
      Parameter #0 [ <required> array $excludes ]
 ): void
param array $excludes
return void

RunConfiguration::addExcluded

predicates

public | static

public static function addExcluded(
      Parameter #0 [ <required> string $path ]
 ): void
param string $path
return void

RunConfiguration::getApiDocsTitle

predicates

public | static

public static function getApiDocsTitle(): ?string
return ?string

RunConfiguration::setApiDocsTitle

predicates

public | static

public static function setApiDocsTitle(
      Parameter #0 [ <required> ?string $api_docs_title ]
 ): void
param ?string $api_docs_title
return void

RunConfiguration::getToctreeMaxDepth

predicates

public | static

public static function getToctreeMaxDepth(): int
return int

RunConfiguration::setToctreeMaxDepth

predicates

public | static

public static function setToctreeMaxDepth(
      Parameter #0 [ <required> int $toctree_max_depth ]
 ): void
param int $toctree_max_depth
return void

RunConfiguration::getToctreeTitlesOnly

predicates

public | static

public static function getToctreeTitlesOnly(): bool
return bool

RunConfiguration::setToctreeTitlesOnly

predicates

public | static

public static function setToctreeTitlesOnly(
      Parameter #0 [ <required> bool $toctree_titles_only ]
 ): void
param bool $toctree_titles_only
return void

RunConfiguration::getShowClassContents

predicates

public | static

public static function getShowClassContents(): bool
return bool

RunConfiguration::setShowClassContents

predicates

public | static

public static function setShowClassContents(
      Parameter #0 [ <required> bool $show_class_contents ]
 ): void
param bool $show_class_contents
return void

RunConfiguration::getLinkToSources

predicates

public | static

public static function getLinkToSources(): bool
return bool

RunConfiguration::setLinkToSources

predicates

public | static

public static function setLinkToSources(
      Parameter #0 [ <required> bool $link_to_sources ]
 ): void
param bool $link_to_sources
return void

RunConfiguration::getLinkToSearchEngine

predicates

public | static

public static function getLinkToSearchEngine(): bool
return bool

RunConfiguration::setLinkToSearchEngine

predicates

public | static

public static function setLinkToSearchEngine(
      Parameter #0 [ <required> bool $link_to_search_engine ]
 ): void
param bool $link_to_search_engine
return void

RunConfiguration::getDownloadFileExt

predicates

public | static

public static function getDownloadFileExt(): array
return array

RunConfiguration::setDownloadFileExt

predicates

public | static

public static function setDownloadFileExt(
      Parameter #0 [ <required> array $download_file_ext ]
 ): void
param array $download_file_ext
return void

RunConfiguration::getShowDatestamp

predicates

public | static

public static function getShowDatestamp(): bool
return bool

RunConfiguration::setShowDatestamp

predicates

public | static

public static function setShowDatestamp(
      Parameter #0 [ <required> bool $show_datestamp ]
 ): void
param bool $show_datestamp
return void

RunConfiguration::get

predicates

public

implements

ContainerInterface::get

inherited from

AbstractStaticContainer::get

@inheritdoc

Finds an entry of the container by its identifier and returns it

param string $id - Identifier of the entry to look for.
return mixed - Entry.
throws NotFoundExceptionInterface - No entry was found for this identifier.
throws ContainerExceptionInterface - Error while retrieving the entry.

@inheritdoc from method ContainerInterface::get

public function get(
      Parameter #0 [ <required> string $id ]
 ): mixed
param string $id
return mixed

RunConfiguration::has

predicates

public

implements

ContainerInterface::has

inherited from

AbstractStaticContainer::has

@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.

param string $id - Identifier of the entry to look for.
return bool

@inheritdoc from method ContainerInterface::has

public function has(
      Parameter #0 [ <required> string $id ]
 ): bool
param string $id
return bool

RunConfiguration::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractStaticContainer::__toString

Returns a string representation of this container

public function __toString(): string
return string

RunConfiguration::load

predicates

public | static

inherited from

AbstractStaticContainer::load

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
param array $configuration
return void
throws ContainerException - if array in param $configuration not correct

RunConfiguration::toArray

predicates

public | static

inherited from

AbstractStaticContainer::toArray

Returns an array representing the container

public static function toArray(): array
return array - array representing the container

RunConfiguration::getMethodName

predicates

public | static

inherited from

AbstractStaticContainer::getMethodName

Return the method name part corresponding to the given param $id

Input of snake_like_name, output CamelCaseName:

foo_bar_name -> FooBarName
public static function getMethodName(
      Parameter #0 [ <required> string $id ]
 ): string
param string $id - snake_like_name
return string - CamelCaseName

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
return int

SourceState::countDirectories

predicates

public | static

public static function countDirectories(): int
return int

SourceState::addDirectory

predicates

public | static

public static function addDirectory(
      Parameter #0 [ <required> string $directory ]
 ): void
param string $directory
return void

SourceState::addPhpFile

predicates

public | static

public static function addPhpFile(
      Parameter #0 [ <required> string $php_file ]
 ): void
param string $php_file
return void

SourceState::addJsFile

predicates

public | static

public static function addJsFile(
      Parameter #0 [ <required> string $js_file ]
 ): void
param string $js_file
return void

SourceState::addSqlFile

predicates

public | static

public static function addSqlFile(
      Parameter #0 [ <required> string $sql_file ]
 ): void
param string $sql_file
return void

SourceState::addMdFile

predicates

public | static

public static function addMdFile(
      Parameter #0 [ <required> string $md_file ]
 ): void
param string $md_file
return void

SourceState::addRstFile

predicates

public | static

public static function addRstFile(
      Parameter #0 [ <required> string $rst_file ]
 ): void
param string $rst_file
return void

SourceState::addOtherFile

predicates

public | static

public static function addOtherFile(
      Parameter #0 [ <required> string $other_file ]
 ): void
param string $other_file
return void

SourceState::getDirectories

predicates

public | static

public static function getDirectories(): array
return array

SourceState::setDirectories

predicates

public | static

public static function setDirectories(
      Parameter #0 [ <required> array $directories ]
 ): void
param array $directories
return void

SourceState::getPhpFiles

predicates

public | static

public static function getPhpFiles(): array
return array

SourceState::setPhpFiles

predicates

public | static

public static function setPhpFiles(
      Parameter #0 [ <required> array $php_files ]
 ): void
param array $php_files
return void

SourceState::getJsFiles

predicates

public | static

public static function getJsFiles(): array
return array

SourceState::setJsFiles

predicates

public | static

public static function setJsFiles(
      Parameter #0 [ <required> array $js_files ]
 ): void
param array $js_files
return void

SourceState::getSqlFiles

predicates

public | static

public static function getSqlFiles(): array
return array

SourceState::setSqlFiles

predicates

public | static

public static function setSqlFiles(
      Parameter #0 [ <required> array $sql_files ]
 ): void
param array $sql_files
return void

SourceState::getMdFiles

predicates

public | static

public static function getMdFiles(): array
return array

SourceState::setMdFiles

predicates

public | static

public static function setMdFiles(
      Parameter #0 [ <required> array $md_files ]
 ): void
param array $md_files
return void

SourceState::getRstFiles

predicates

public | static

public static function getRstFiles(): array
return array

SourceState::setRstFiles

predicates

public | static

public static function setRstFiles(
      Parameter #0 [ <required> array $rst_files ]
 ): void
param array $rst_files
return void

SourceState::getOtherFiles

predicates

public | static

public static function getOtherFiles(): array
return array

SourceState::setOtherFiles

predicates

public | static

public static function setOtherFiles(
      Parameter #0 [ <required> array $other_files ]
 ): void
param array $other_files
return void

SourceState::getFileOrder

predicates

public | static

public static function getFileOrder(): array
return array

SourceState::setFileOrder

predicates

public | static

public static function setFileOrder(
      Parameter #0 [ <required> array $file_order ]
 ): void
param array $file_order
return void

Fri, 31 Mar 2023 13:22:46 +0000


Fri, 31 Mar 2023 13:22:46 +0000

log

Depends on

Dependency invoked by

globals

Log

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
param bool $enabled
return 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
param string $err
param ?Throwable $e
param bool $back_trace
return void

Log::warning

predicates

public | static

public static function warning(
      Parameter #0 [ <required> string $warning ]
      Parameter #1 [ <optional> bool $back_trace = true ]
 ): void
param string $warning
param bool $back_trace
return void

Log::notice

predicates

public | static

public static function notice(
      Parameter #0 [ <required> string $out ]
      Parameter #1 [ <optional> bool $back_trace = true ]
 ): void
param string $out
param bool $back_trace
return void

Log::info

predicates

public | static

public static function info(
      Parameter #0 [ <required> string $out ]
      Parameter #1 [ <optional> bool $back_trace = true ]
 ): void
param string $out
param bool $back_trace
return void

Log::debug

predicates

public | static

public static function debug(
      Parameter #0 [ <required> string $out ]
      Parameter #1 [ <optional> bool $back_trace = true ]
 ): void
param string $out
param bool $back_trace
return void

Log::getErrorCount

predicates

public | static

public static function getErrorCount(): int
return int

Log::getWarningsCount

predicates

public | static

public static function getWarningsCount(): int
return int

Fri, 31 Mar 2023 13:22:46 +0000


Fri, 31 Mar 2023 13:22:46 +0000

process

Depends on

Dependency invoked by

format

CommentLexer

globals

ClassLexer | CommentOrganizer | Constitution | DocScout | DocWorker | ProcessManager | SourceScout | TreeWorker

log

AbstractLexer | Constitution | DocWorker | FunctionLexer | MethodLexer | ProcessManager | SourceScout | TreeWorker

rst

ClassLexer | ConstantLexer | DocWorker | FunctionLexer | MethodLexer | SourceScout | TreeWorker

tag

AbstractLexer | CommentLexer | CommentOrganizer | FunctionLexer | MethodLexer

work

AbstractLexer | ClassLexer | CommentHelper | ConstantLexer | DocWorker | FunctionLexer | MethodLexer | TreeWorker

Main processing logic

AbstractLexer

namespace

bhenk\doc2rst\process

predicates

Abstract

implements

Stringable

known subclasses

ClassLexer | CommentLexer | ConstantLexer | FunctionLexer | MethodLexer


Methods
AbstractLexer::__toString

predicates

public

implements

Stringable::__toString

see also

Stringable

public function __toString(): string
return string

AbstractLexer::getSegments

predicates

public

public function getSegments(): array
return array

AbstractLexer::setSegments

predicates

public

public function setSegments(
      Parameter #0 [ <required> array $segments ]
 ): void
param array $segments
return void

AbstractLexer::addSegment

predicates

public

public function addSegment(
      Parameter #0 [ <required> Stringable|string $segment ]
 ): void
param Stringable | string $segment
return void

AbstractLexer::resolveReflectionType

predicates

protected

protected function resolveReflectionType(
      Parameter #0 [ <required> ReflectionType $reflectionType ]
 ): string
param ReflectionType $reflectionType
return string

AbstractLexer::checkParameters

predicates

protected

protected function checkParameters(
      Parameter #0 [ <required> bhenk\doc2rst\process\CommentLexer $lexer ]
      Parameter #1 [ <required> array $params ]
 ): void
param CommentLexer $lexer
param array $params
return void

Fri, 31 Mar 2023 13:22:46 +0000

ClassLexer

namespace

bhenk\doc2rst\process

predicates

Cloneable | Instantiable

implements

Stringable

extends

AbstractLexer

hierarchy

ClassLexer -> AbstractLexer


Constructor
ClassLexer::__construct

predicates

public | constructor

public function __construct(
      Parameter #0 [ <required> ReflectionClass $class ]
 )
param ReflectionClass $class

Methods
ClassLexer::lex

predicates

public

public function lex(): void
return void

ClassLexer::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractLexer::__toString

see also

Stringable

public function __toString(): string
return string

ClassLexer::getSegments

predicates

public

inherited from

AbstractLexer::getSegments

public function getSegments(): array
return array

ClassLexer::setSegments

predicates

public

inherited from

AbstractLexer::setSegments

public function setSegments(
      Parameter #0 [ <required> array $segments ]
 ): void
param array $segments
return void

ClassLexer::addSegment

predicates

public

inherited from

AbstractLexer::addSegment

public function addSegment(
      Parameter #0 [ <required> Stringable|string $segment ]
 ): void
param Stringable | string $segment
return void

ClassLexer::resolveReflectionType

predicates

protected

inherited from

AbstractLexer::resolveReflectionType

protected function resolveReflectionType(
      Parameter #0 [ <required> ReflectionType $reflectionType ]
 ): string
param ReflectionType $reflectionType
return string

ClassLexer::checkParameters

predicates

protected

inherited from

AbstractLexer::checkParameters

protected function checkParameters(
      Parameter #0 [ <required> bhenk\doc2rst\process\CommentLexer $lexer ]
      Parameter #1 [ <required> array $params ]
 ): void
param CommentLexer $lexer
param array $params
return 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
return void

CommentHelper::getInheritedComment

predicates

public

public function getInheritedComment(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

CommentLexer

namespace

bhenk\doc2rst\process

predicates

Cloneable | Instantiable

implements

Stringable

extends

AbstractLexer

hierarchy

CommentLexer -> AbstractLexer

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 ]
 )
param string $docComment - string that starts with /** followed by a whitespace character
param bool $ignoreInheritdoc

Methods
CommentLexer::getCommentOrganizer

predicates

public

public function getCommentOrganizer(): CommentOrganizer

CommentLexer::lex

predicates

public

public function lex(): void
return void

CommentLexer::markupSummary

predicates

public

public function markupSummary(
      Parameter #0 [ <required> array $processed ]
 ): array
param array $processed
return 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
param string $line - any string
return string - string with bold markup and other markup preserved

CommentLexer::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractLexer::__toString

see also

Stringable

public function __toString(): string
return string

CommentLexer::getSegments

predicates

public

inherited from

AbstractLexer::getSegments

public function getSegments(): array
return array

CommentLexer::setSegments

predicates

public

inherited from

AbstractLexer::setSegments

public function setSegments(
      Parameter #0 [ <required> array $segments ]
 ): void
param array $segments
return void

CommentLexer::addSegment

predicates

public

inherited from

AbstractLexer::addSegment

public function addSegment(
      Parameter #0 [ <required> Stringable|string $segment ]
 ): void
param Stringable | string $segment
return void

CommentLexer::resolveReflectionType

predicates

protected

inherited from

AbstractLexer::resolveReflectionType

protected function resolveReflectionType(
      Parameter #0 [ <required> ReflectionType $reflectionType ]
 ): string
param ReflectionType $reflectionType
return string

CommentLexer::checkParameters

predicates

protected

inherited from

AbstractLexer::checkParameters

protected function checkParameters(
      Parameter #0 [ <required> bhenk\doc2rst\process\CommentLexer $lexer ]
      Parameter #1 [ <required> array $params ]
 ): void
param CommentLexer $lexer
param array $params
return void

Fri, 31 Mar 2023 13:22:46 +0000

CommentOrganizer

namespace

bhenk\doc2rst\process

predicates

Cloneable | Instantiable

implements

Stringable


Constructor
CommentOrganizer::__construct

predicates

public | constructor

public function __construct(
      Parameter #0 [ <optional> bool $indented = false ]
 )
param bool $indented

Methods
CommentOrganizer::isIndented

predicates

public

public function isIndented(): bool
return bool

CommentOrganizer::setIndented

predicates

public

public function setIndented(
      Parameter #0 [ <required> bool $indented ]
 ): void
param bool $indented
return void

CommentOrganizer::setOrder

predicates

public

public function setOrder()

CommentOrganizer::render

predicates

public

public function render(): string
return string

CommentOrganizer::__toString

predicates

public

implements

Stringable::__toString

public function __toString(): string
return string

CommentOrganizer::getSummary

predicates

public

public function getSummary(): string
return string

CommentOrganizer::setSummary

predicates

public

public function setSummary(
      Parameter #0 [ <required> Stringable|string $summary ]
 ): void
param Stringable | string $summary
return void

CommentOrganizer::getLines

predicates

public

public function getLines(): array
return array

CommentOrganizer::setLines

predicates

public

public function setLines(
      Parameter #0 [ <required> array $lines ]
 ): void
param array $lines
return void

CommentOrganizer::addLine

predicates

public

public function addLine(
      Parameter #0 [ <required> Stringable|string $line ]
 ): void
param Stringable | string $line
return void

CommentOrganizer::getSignature

predicates

public

public function getSignature(): string
return string

CommentOrganizer::setSignature

predicates

public

public function setSignature(
      Parameter #0 [ <required> string $signature ]
 ): void
param string $signature
return void

CommentOrganizer::getTags

predicates

public

public function getTags(): array
return array

CommentOrganizer::setTags

predicates

public

public function setTags(
      Parameter #0 [ <required> array $tags ]
 ): void
param array $tags
return void

CommentOrganizer::addTag

predicates

public

public function addTag(
      Parameter #0 [ <required> bhenk\doc2rst\tag\TagInterface $tag ]
 ): void
param TagInterface $tag
return void

CommentOrganizer::getTagsByName

predicates

public

public function getTagsByName(
      Parameter #0 [ <required> string $tagname ]
 ): array
param string $tagname
return array

CommentOrganizer::removeTagsByName

predicates

public

public function removeTagsByName(
      Parameter #0 [ <required> string $tagname ]
 ): array
param string $tagname
return array

Fri, 31 Mar 2023 13:22:46 +0000

ConstantLexer

namespace

bhenk\doc2rst\process

predicates

Cloneable | Instantiable

implements

Stringable

extends

AbstractLexer

hierarchy

ConstantLexer -> AbstractLexer


Constructor
ConstantLexer::__construct

predicates

public | constructor

public function __construct(
      Parameter #0 [ <required> ReflectionClassConstant $constant ]
 )
param ReflectionClassConstant $constant

Methods
ConstantLexer::lex

predicates

public

public function lex(): void
return void

ConstantLexer::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractLexer::__toString

see also

Stringable

public function __toString(): string
return string

ConstantLexer::getSegments

predicates

public

inherited from

AbstractLexer::getSegments

public function getSegments(): array
return array

ConstantLexer::setSegments

predicates

public

inherited from

AbstractLexer::setSegments

public function setSegments(
      Parameter #0 [ <required> array $segments ]
 ): void
param array $segments
return void

ConstantLexer::addSegment

predicates

public

inherited from

AbstractLexer::addSegment

public function addSegment(
      Parameter #0 [ <required> Stringable|string $segment ]
 ): void
param Stringable | string $segment
return void

ConstantLexer::resolveReflectionType

predicates

protected

inherited from

AbstractLexer::resolveReflectionType

protected function resolveReflectionType(
      Parameter #0 [ <required> ReflectionType $reflectionType ]
 ): string
param ReflectionType $reflectionType
return string

ConstantLexer::checkParameters

predicates

protected

inherited from

AbstractLexer::checkParameters

protected function checkParameters(
      Parameter #0 [ <required> bhenk\doc2rst\process\CommentLexer $lexer ]
      Parameter #1 [ <required> array $params ]
 ): void
param CommentLexer $lexer
param array $params
return void

Fri, 31 Mar 2023 13:22:46 +0000

Constitution

namespace

bhenk\doc2rst\process

predicates

Cloneable | Instantiable

implements

ConstitutionInterface


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 ]
 )
param string $doc_root - the root-folder for documentation
param ?string $root - Optional. Parent directory of main.php

Methods
Constitution::establishConfiguration

predicates

public

implements

ConstitutionInterface::establishConfiguration

public function establishConfiguration(): void
return void

Constitution::autoFindApplicationRoot

predicates

public | static

public static function autoFindApplicationRoot(
      Parameter #0 [ <required> string $doc_root ]
      Parameter #1 [ <required> ?string $root ]
 ): ?string
param string $doc_root
param ?string $root
return ?string

Constitution::autoFindBootstrapFile

predicates

public | static

public static function autoFindBootstrapFile(
      Parameter #0 [ <required> string $doc_root ]
      Parameter #1 [ <required> ?string $root ]
 ): ?string
param string $doc_root
param ?string $root
return ?string

Constitution::autoFindVendor

predicates

public | static

public static function autoFindVendor(
      Parameter #0 [ <required> string $application_root ]
 ): ?string
param string $application_root
return ?string

Fri, 31 Mar 2023 13:22:46 +0000

ConstitutionInterface

namespace

bhenk\doc2rst\process

predicates

Abstract | Interface

known implementations

Constitution

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
return 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
return 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
param string $path - absolute path to a file, with extension ‘.php
return Document

Fri, 31 Mar 2023 13:22:46 +0000

FunctionLexer

namespace

bhenk\doc2rst\process

predicates

Cloneable | Instantiable

implements

Stringable

extends

AbstractLexer

hierarchy

FunctionLexer -> AbstractLexer


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 ]
 )
param ReflectionFunction $function
param string $fq_classname
param string $shortname

Methods
FunctionLexer::lex

predicates

public

public function lex(): void
return void

FunctionLexer::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractLexer::__toString

see also

Stringable

public function __toString(): string
return string

FunctionLexer::getSegments

predicates

public

inherited from

AbstractLexer::getSegments

public function getSegments(): array
return array

FunctionLexer::setSegments

predicates

public

inherited from

AbstractLexer::setSegments

public function setSegments(
      Parameter #0 [ <required> array $segments ]
 ): void
param array $segments
return void

FunctionLexer::addSegment

predicates

public

inherited from

AbstractLexer::addSegment

public function addSegment(
      Parameter #0 [ <required> Stringable|string $segment ]
 ): void
param Stringable | string $segment
return void

FunctionLexer::resolveReflectionType

predicates

protected

inherited from

AbstractLexer::resolveReflectionType

protected function resolveReflectionType(
      Parameter #0 [ <required> ReflectionType $reflectionType ]
 ): string
param ReflectionType $reflectionType
return string

FunctionLexer::checkParameters

predicates

protected

inherited from

AbstractLexer::checkParameters

protected function checkParameters(
      Parameter #0 [ <required> bhenk\doc2rst\process\CommentLexer $lexer ]
      Parameter #1 [ <required> array $params ]
 ): void
param CommentLexer $lexer
param array $params
return void

Fri, 31 Mar 2023 13:22:46 +0000

MethodLexer

namespace

bhenk\doc2rst\process

predicates

Cloneable | Instantiable

implements

Stringable

extends

AbstractLexer

hierarchy

MethodLexer -> AbstractLexer


Constructor
MethodLexer::__construct

predicates

public | constructor

public function __construct(
      Parameter #0 [ <required> ?ReflectionMethod $method ]
 )
param ?ReflectionMethod $method

Methods
MethodLexer::lex

predicates

public

public function lex(): void
return void

MethodLexer::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractLexer::__toString

see also

Stringable

public function __toString(): string
return string

MethodLexer::getSegments

predicates

public

inherited from

AbstractLexer::getSegments

public function getSegments(): array
return array

MethodLexer::setSegments

predicates

public

inherited from

AbstractLexer::setSegments

public function setSegments(
      Parameter #0 [ <required> array $segments ]
 ): void
param array $segments
return void

MethodLexer::addSegment

predicates

public

inherited from

AbstractLexer::addSegment

public function addSegment(
      Parameter #0 [ <required> Stringable|string $segment ]
 ): void
param Stringable | string $segment
return void

MethodLexer::resolveReflectionType

predicates

protected

inherited from

AbstractLexer::resolveReflectionType

protected function resolveReflectionType(
      Parameter #0 [ <required> ReflectionType $reflectionType ]
 ): string
param ReflectionType $reflectionType
return string

MethodLexer::checkParameters

predicates

protected

inherited from

AbstractLexer::checkParameters

protected function checkParameters(
      Parameter #0 [ <required> bhenk\doc2rst\process\CommentLexer $lexer ]
      Parameter #1 [ <required> array $params ]
 ): void
param CommentLexer $lexer
param array $params
return 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

The parameter doc_root is the absolute path to the documentation directory.
When calling from the phar file, optional parameter $root is the parent directory of the phar.
public function __construct(
      Parameter #0 [ <required> string $doc_root ]
      Parameter #1 [ <optional> ?string $root = NULL ]
 )
param string $doc_root - The documentation directory; autoconfiguration is computed from this directory.
param ?string $root - Optional. Parent directory of main.php

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:

public function quickStart(): void
return 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.

public function run(): void
return 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
param ConstitutionInterface $constitution
return 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
return 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
return int - number of directories actually created

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
return int - number of directories actually created

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
return int - number of directories actually created

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
return int - number of directories actually created

SourceScout::makeTocFiles

predicates

public

public function makeTocFiles(
      Parameter #0 [ <required> int $flags ]
 ): int
param int $flags
return 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
return void

Fri, 31 Mar 2023 13:22:46 +0000


Fri, 31 Mar 2023 13:22:46 +0000

rst

Depends on

Dependency invoked by

globals

Document

Helper classes capable of expressing rst-syntax

CodeBlock

namespace

bhenk\doc2rst\rst

predicates

Cloneable | Instantiable

implements

Stringable


Constructor
CodeBlock::__construct

predicates

public | constructor

public function __construct(
      Parameter #0 [ <optional> string $taste = 'php' ]
 )
param string $taste

Methods
CodeBlock::__toString

predicates

public

implements

Stringable::__toString

public function __toString(): string
return string

CodeBlock::getLines

predicates

public

public function getLines(): array
return array

CodeBlock::setLines

predicates

public

public function setLines(
      Parameter #0 [ <required> array $lines ]
 ): void
param array $lines
return void

CodeBlock::addLine

predicates

public

public function addLine(
      Parameter #0 [ <required> Stringable|string $line ]
 ): void
param Stringable | string $line
return void

CodeBlock::addPart

predicates

public

public function addPart(
      Parameter #0 [ <required> Stringable|string $part ]
 ): void
param Stringable | string $part
return void

CodeBlock::getTaste

predicates

public

public function getTaste(): string
return string

CodeBlock::setTaste

predicates

public

public function setTaste(
      Parameter #0 [ <required> string $taste ]
 ): void
param string $taste
return void

Fri, 31 Mar 2023 13:22:46 +0000

Document

namespace

bhenk\doc2rst\rst

predicates

Cloneable | Instantiable

implements

Stringable


Constructor
Document::__construct

predicates

public | constructor

public function __construct(
      Parameter #0 [ <required> string $filename ]
 )
param string $filename

Methods
Document::getFilename

predicates

public

public function getFilename(): string
return string

Document::setFilename

predicates

public

public function setFilename(
      Parameter #0 [ <required> string $filename ]
 ): void
param string $filename
return void

Document::setDirectory

predicates

public

public function setDirectory(
      Parameter #0 [ <required> string $dir ]
 ): void
param string $dir
return void

Document::putContents

predicates

public

public function putContents(): void
return void

Document::__toString

predicates

public

implements

Stringable::__toString

public function __toString(): string
return string

Document::getEntries

predicates

public

public function getEntries(): array
return array

Document::setEntries

predicates

public

public function setEntries(
      Parameter #0 [ <required> array $entries ]
 ): void
param array $entries
return void

Document::addEntry

predicates

public

public function addEntry(
      Parameter #0 [ <required> Stringable|string $entry ]
 ): Stringable|string
param Stringable | string $entry
return Stringable | string

Fri, 31 Mar 2023 13:22:46 +0000

DownloadList

namespace

bhenk\doc2rst\rst

predicates

Cloneable | Instantiable

implements

Stringable


Constructor
DownloadList::__construct

predicates

public | constructor

public function __construct(
      Parameter #0 [ <optional> ?string $caption = NULL ]
 )
param ?string $caption

Methods
DownloadList::isEmpty

predicates

public

public function isEmpty(): bool
return bool

DownloadList::__toString

predicates

public

implements

Stringable::__toString

public function __toString(): string
return string

DownloadList::addEntry

predicates

public

public function addEntry(
      Parameter #0 [ <required> string $name ]
      Parameter #1 [ <required> string $link ]
 )
param string $name
param string $link

DownloadList::setCaption

predicates

public

public function setCaption(
      Parameter #0 [ <required> string $caption ]
 )
param string $caption

DownloadList::getCaption

predicates

public

public function getCaption(): ?string
return ?string

DownloadList::getEntries

predicates

public

public function getEntries(): array
return array

DownloadList::setEntries

predicates

public

public function setEntries(
      Parameter #0 [ <required> array $entries ]
 ): void
param array $entries
return void

Fri, 31 Mar 2023 13:22:46 +0000

Label

namespace

bhenk\doc2rst\rst

predicates

Cloneable | Instantiable

implements

Stringable


Constructor
Label::__construct

predicates

public | constructor

public function __construct(
      Parameter #0 [ <required> string $label_name ]
 )
param string $label_name

Methods
Label::__toString

predicates

public

implements

Stringable::__toString

public function __toString(): string
return string

Label::getLabelName

predicates

public

public function getLabelName(): string
return string

Label::setLabelName

predicates

public

public function setLabelName(
      Parameter #0 [ <required> string $label_name ]
 ): void
param string $label_name
return void

Fri, 31 Mar 2023 13:22:46 +0000

Table

namespace

bhenk\doc2rst\rst

predicates

Cloneable | Instantiable

implements

Stringable


Constructor
Table::__construct

predicates

public | constructor

public function __construct(
      Parameter #0 [ <required> int $columns ]
 )
param int $columns

Methods
Table::setHeading

predicates

public

public function setHeading(
      Parameter #0 [ <optional> Stringable|string|int|bool ...$row ]
 ): void
param Stringable | string | int | bool $row
return void

Table::addRow

predicates

public

public function addRow(
      Parameter #0 [ <optional> Stringable|string|int|bool ...$row ]
 ): void
param Stringable | string | int | bool $row
return void

Table::__toString

predicates

public

implements

Stringable::__toString

public function __toString(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

Title

namespace

bhenk\doc2rst\rst

predicates

Cloneable | Instantiable

implements

Stringable


Constructor
Title::__construct

predicates

public | constructor

public function __construct(
      Parameter #0 [ <required> string $title ]
      Parameter #1 [ <optional> int $level = 0 ]
 )
param string $title
param int $level

Methods
Title::getTitle

predicates

public

public function getTitle(): string
return string

Title::setTitle

predicates

public

public function setTitle(
      Parameter #0 [ <required> string $title ]
 ): void
param string $title
return void

Title::getLevel

predicates

public

public function getLevel(): int
return int

Title::setLevel

predicates

public

public function setLevel(
      Parameter #0 [ <required> int $level ]
 ): void
param int $level
return void

Title::__toString

predicates

public

implements

Stringable::__toString

public function __toString(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

TocTree

namespace

bhenk\doc2rst\rst

predicates

Cloneable | Instantiable

implements

Stringable


Constructor
TocTree::__construct

predicates

public | constructor

public function __construct(
      Parameter #0 [ <optional> array $entries = [] ]
 )
param array $entries

Methods
TocTree::isEmpty

predicates

public

public function isEmpty(): bool
return bool

TocTree::__toString

predicates

public

implements

Stringable::__toString

public function __toString(): string
return string

TocTree::addEntry

predicates

public

public function addEntry(
      Parameter #0 [ <required> string $link ]
      Parameter #1 [ <optional> ?string $title = NULL ]
 ): void
param string $link
param ?string $title
return void

TocTree::getEntries

predicates

public

public function getEntries(): array
return array

TocTree::setEntries

predicates

public

public function setEntries(
      Parameter #0 [ <required> array $entries ]
 ): void
param array $entries
return void

TocTree::getMaxDepth

predicates

public

public function getMaxDepth(): int
return int

TocTree::setMaxDepth

predicates

public

public function setMaxDepth(
      Parameter #0 [ <required> int $max_depth ]
 ): void
param int $max_depth
return void

TocTree::getCaption

predicates

public

public function getCaption(): ?string
return ?string

TocTree::setCaption

predicates

public

public function setCaption(
      Parameter #0 [ <required> ?string $caption ]
 ): void
param ?string $caption
return void

TocTree::getName

predicates

public

public function getName(): ?string
return ?string

TocTree::setName

predicates

public

public function setName(
      Parameter #0 [ <required> ?string $name ]
 ): void
param ?string $name
return void

TocTree::isTitlesOnly

predicates

public

public function isTitlesOnly(): bool
return bool

TocTree::setTitlesOnly

predicates

public

public function setTitlesOnly(
      Parameter #0 [ <required> bool $titles_only ]
 ): void
param bool $titles_only
return void

Fri, 31 Mar 2023 13:22:46 +0000

UnicodeDirective

namespace

bhenk\doc2rst\rst

predicates

Cloneable | Instantiable

implements

Stringable


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 ]
 )
param string $alias
param string $code
param bool $trim
param ?string $comment

Methods
UnicodeDirective::__toString

predicates

public

implements

Stringable::__toString

public function __toString(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000


Fri, 31 Mar 2023 13:22:46 +0000

tag

Depends on

Dependency invoked by

globals

AbstractTag

log

AbstractTag | TagFactory

work

AbstractLinkTag | AbstractTag | AbstractTypeTag | ParamTag

Classes representing tags, capable of rendering their information to reStructuredText

AbstractLinkTag

namespace

bhenk\doc2rst\tag

predicates

Abstract

implements

Stringable | TagInterface

extends

AbstractTag

hierarchy

AbstractLinkTag -> AbstractTag

known subclasses

AbstractTypeTag | LicenseTag | LinkTag | SeeTag

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

AbstractTag::TAG

var string TAG - the name of this tag
string(12) "@name_of_tag"

Constructor
AbstractLinkTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
AbstractLinkTag::render

predicates

public

implements

AbstractTag::render

Renders the tag

syntax

@tag_name [URI] [description]
{@tag_name [URI] [description]}
public function render(): void
return void

AbstractLinkTag::__toString

predicates

public

implements

Stringable::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

AbstractLinkTag::getUri

predicates

public

public function getUri(): ?string
return ?string

AbstractLinkTag::setUri

predicates

public

public function setUri(
      Parameter #0 [ <required> ?string $uri ]
 ): void
param ?string $uri
return void

AbstractLinkTag::getDescription

predicates

public

public function getDescription(): ?string
return ?string

AbstractLinkTag::setDescription

predicates

public

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

AbstractLinkTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

AbstractLinkTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

AbstractLinkTag::getTagName

predicates

public | abstract

implements

TagInterface::getTagName

inherited from

AbstractTag::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public abstract function getTagName(): string
return string

AbstractLinkTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

AbstractLinkTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

AbstractLinkTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

AbstractLinkTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

AbstractLinkTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

AbstractLinkTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

AbstractSimpleTag

namespace

bhenk\doc2rst\tag

predicates

Abstract

implements

Stringable | TagInterface

extends

AbstractTag

hierarchy

AbstractSimpleTag -> AbstractTag

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

AbstractTag::TAG

var string TAG - the name of this tag
string(12) "@name_of_tag"

Constructor
AbstractSimpleTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
AbstractSimpleTag::render

predicates

public

implements

AbstractTag::render

Renders the description of simple tags

@inheritdoc

Render the $tag_string

Upon this command subclasses should parse the $tag_string.

return void

@inheritdoc from method AbstractTag::render

public function render(): void
return void

AbstractSimpleTag::__toString

predicates

public

implements

Stringable::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

AbstractSimpleTag::getDescription

predicates

public

Get the <description>

public function getDescription(): ?string
return ?string

AbstractSimpleTag::setDescription

predicates

public

Set the <description>

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

AbstractSimpleTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

AbstractSimpleTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

AbstractSimpleTag::getTagName

predicates

public | abstract

implements

TagInterface::getTagName

inherited from

AbstractTag::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public abstract function getTagName(): string
return string

AbstractSimpleTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

AbstractSimpleTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

AbstractSimpleTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

AbstractSimpleTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

AbstractSimpleTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

AbstractSimpleTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

AbstractTag

namespace

bhenk\doc2rst\tag

predicates

Abstract

implements

Stringable | TagInterface

known subclasses

AbstractLinkTag | AbstractSimpleTag | ApiTag | AuthorTag | PackageTag

Abstract base class for tags


Constants
AbstractTag::TAG

predicates

public

var string TAG - the name of this tag
string(12) "@name_of_tag"

Constructor
AbstractTag::__construct

predicates

public | constructor

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
AbstractTag::getTagString

predicates

public

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

AbstractTag::render

predicates

protected | abstract

Render the $tag_string

Upon this command subclasses should parse the $tag_string.

protected abstract function render(): void
return void

AbstractTag::getLine

predicates

public

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

AbstractTag::getTagName

predicates

public | abstract

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public abstract function getTagName(): string
return string

AbstractTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

AbstractTag::isInline

predicates

public

implements

TagInterface::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

AbstractTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

AbstractTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

AbstractTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

AbstractTag::toRst

predicates

public

implements

TagInterface::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

AbstractTag::__toString

predicates

public | abstract

public abstract function __toString(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

AbstractTypeTag

namespace

bhenk\doc2rst\tag

predicates

Abstract

implements

Stringable | TagInterface

extends

AbstractLinkTag

hierarchy

AbstractTypeTag -> AbstractLinkTag -> AbstractTag

known subclasses

ParamTag | ReturnTag | ThrowsTag | UsesTag

Abstract tag that handles <”Type”> [description] syntax

syntax

@tag_name <"Type"> [description]

Constants
AbstractTypeTag::TAG

predicates

public

Inherited from

AbstractTag::TAG

var string TAG - the name of this tag
string(12) "@name_of_tag"

Constructor
AbstractTypeTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
AbstractTypeTag::render

predicates

public

implements

AbstractTag::render

Renders a typed tag

syntax

@tag_name <"Type"> [description]
public function render(): void
return void

AbstractTypeTag::__toString

predicates

public

implements

Stringable::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

AbstractTypeTag::getType

predicates

public

public function getType(): ?string
return ?string

AbstractTypeTag::setType

predicates

public

public function setType(
      Parameter #0 [ <required> ?string $type ]
 ): void
param ?string $type
return void

AbstractTypeTag::getUri

predicates

public

inherited from

AbstractLinkTag::getUri

public function getUri(): ?string
return ?string

AbstractTypeTag::setUri

predicates

public

inherited from

AbstractLinkTag::setUri

public function setUri(
      Parameter #0 [ <required> ?string $uri ]
 ): void
param ?string $uri
return void

AbstractTypeTag::getDescription

predicates

public

inherited from

AbstractLinkTag::getDescription

public function getDescription(): ?string
return ?string

AbstractTypeTag::setDescription

predicates

public

inherited from

AbstractLinkTag::setDescription

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

AbstractTypeTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

AbstractTypeTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

AbstractTypeTag::getTagName

predicates

public | abstract

implements

TagInterface::getTagName

inherited from

AbstractTag::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public abstract function getTagName(): string
return string

AbstractTypeTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

AbstractTypeTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

AbstractTypeTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

AbstractTypeTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

AbstractTypeTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

AbstractTypeTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

AbstractVersionTag

namespace

bhenk\doc2rst\tag

predicates

Abstract

implements

Stringable | TagInterface

extends

AbstractSimpleTag

hierarchy

AbstractVersionTag -> AbstractSimpleTag -> AbstractTag

known subclasses

DeprecatedTag | SinceTag | VersionTag

Abstract tag that handles [<”Semantic Version”>] [<description>] syntax

syntax

@tag_name [<"Semantic Version">] [<description>]

Constants
AbstractVersionTag::TAG

predicates

public

Inherited from

AbstractTag::TAG

var string TAG - the name of this tag
string(12) "@name_of_tag"

Constructor
AbstractVersionTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
AbstractVersionTag::render

predicates

public

implements

AbstractTag::render

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.

return void

@inheritdoc from method AbstractTag::render

public function render(): void
return void

AbstractVersionTag::__toString

predicates

public

implements

Stringable::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

AbstractVersionTag::getSemanticVersion

predicates

public

Get the [<”Semantic Version”>]

public function getSemanticVersion(): ?string
return ?string

AbstractVersionTag::setSemanticVersion

predicates

public

Set the [<”Semantic Version”>]

public function setSemanticVersion(
      Parameter #0 [ <required> string $semantic_version ]
 ): void
param string $semantic_version
return void

AbstractVersionTag::getDescription

predicates

public

inherited from

AbstractSimpleTag::getDescription

Get the <description>

public function getDescription(): ?string
return ?string

AbstractVersionTag::setDescription

predicates

public

inherited from

AbstractSimpleTag::setDescription

Set the <description>

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

AbstractVersionTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

AbstractVersionTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

AbstractVersionTag::getTagName

predicates

public | abstract

implements

TagInterface::getTagName

inherited from

AbstractTag::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public abstract function getTagName(): string
return string

AbstractVersionTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

AbstractVersionTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

AbstractVersionTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

AbstractVersionTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

AbstractVersionTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

AbstractVersionTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

ApiTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

Stringable | TagInterface

extends

AbstractTag

hierarchy

ApiTag -> AbstractTag

Represents the api tag

syntax

@api

see also

PSR-19 @api


Constants
ApiTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(4) "@api"

Constructor
ApiTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
ApiTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

ApiTag::render

predicates

public

implements

AbstractTag::render

Renders the api tag

syntax

@api
public function render(): void
return void

ApiTag::__toString

predicates

public

implements

Stringable::__toString

Returns a reStructuredText representation of the contents of this Tag

(which is always the empty string “”)

public function __toString(): string
return string - reStructuredText representation of contents

ApiTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

ApiTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

ApiTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

ApiTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

ApiTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

ApiTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

ApiTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

ApiTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

AuthorTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

Stringable | TagInterface

extends

AbstractTag

hierarchy

AuthorTag -> AbstractTag

Represents the author tag

syntax

@author [name] [<email address>]

see also

PSR-19 @author


Constants
AuthorTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(7) "@author"

Constructor
AuthorTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
AuthorTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

AuthorTag::render

predicates

public

implements

AbstractTag::render

Renders the author tag

syntax

@author [name] [<email address>]
public function render(): void
return void

AuthorTag::__toString

predicates

public

implements

Stringable::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

AuthorTag::getName

predicates

public

public function getName(): ?string
return ?string

AuthorTag::setName

predicates

public

public function setName(
      Parameter #0 [ <required> ?string $name ]
 ): void
param ?string $name
return void

AuthorTag::getEmail

predicates

public

public function getEmail(): ?string
return ?string

AuthorTag::setEmail

predicates

public

public function setEmail(
      Parameter #0 [ <required> ?string $email ]
 ): void
param ?string $email
return void

AuthorTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

AuthorTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

AuthorTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

AuthorTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

AuthorTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

AuthorTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

AuthorTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

AuthorTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

CopyrightTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

TagInterface | Stringable

extends

AbstractSimpleTag

hierarchy

CopyrightTag -> AbstractSimpleTag -> AbstractTag

Represents the copyright tag

syntax

@copyright <description>

Constants
CopyrightTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(10) "@copyright"

Constructor
CopyrightTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
CopyrightTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

CopyrightTag::render

predicates

public

implements

AbstractTag::render

inherited from

AbstractSimpleTag::render

Renders the description of simple tags

@inheritdoc

Render the $tag_string

Upon this command subclasses should parse the $tag_string.

return void

@inheritdoc from method AbstractTag::render

public function render(): void
return void

CopyrightTag::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractSimpleTag::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

CopyrightTag::getDescription

predicates

public

inherited from

AbstractSimpleTag::getDescription

Get the <description>

public function getDescription(): ?string
return ?string

CopyrightTag::setDescription

predicates

public

inherited from

AbstractSimpleTag::setDescription

Set the <description>

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

CopyrightTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

CopyrightTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

CopyrightTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

CopyrightTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

CopyrightTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

CopyrightTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

CopyrightTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

CopyrightTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

DeprecatedTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

TagInterface | Stringable

extends

AbstractVersionTag

hierarchy

DeprecatedTag -> AbstractVersionTag -> AbstractSimpleTag -> AbstractTag

Represents the deprecated tag

syntax

@deprecated [<"Semantic Version">] [<description>]

Constants
DeprecatedTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(11) "@deprecated"

Constructor
DeprecatedTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
DeprecatedTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

DeprecatedTag::render

predicates

public

implements

AbstractTag::render

inherited from

AbstractVersionTag::render

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.

return void

@inheritdoc from method AbstractTag::render

public function render(): void
return void

DeprecatedTag::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractVersionTag::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

DeprecatedTag::getSemanticVersion

predicates

public

inherited from

AbstractVersionTag::getSemanticVersion

Get the [<”Semantic Version”>]

public function getSemanticVersion(): ?string
return ?string

DeprecatedTag::setSemanticVersion

predicates

public

inherited from

AbstractVersionTag::setSemanticVersion

Set the [<”Semantic Version”>]

public function setSemanticVersion(
      Parameter #0 [ <required> string $semantic_version ]
 ): void
param string $semantic_version
return void

DeprecatedTag::getDescription

predicates

public

inherited from

AbstractSimpleTag::getDescription

Get the <description>

public function getDescription(): ?string
return ?string

DeprecatedTag::setDescription

predicates

public

inherited from

AbstractSimpleTag::setDescription

Set the <description>

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

DeprecatedTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

DeprecatedTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

DeprecatedTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

DeprecatedTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

DeprecatedTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

DeprecatedTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

DeprecatedTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

DeprecatedTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

GeneratedTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

TagInterface | Stringable

extends

AbstractSimpleTag

hierarchy

GeneratedTag -> AbstractSimpleTag -> AbstractTag

Represents the generated tag

syntax

@generated [description]

Constants
GeneratedTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(10) "@generated"

Constructor
GeneratedTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
GeneratedTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

GeneratedTag::render

predicates

public

implements

AbstractTag::render

inherited from

AbstractSimpleTag::render

Renders the description of simple tags

@inheritdoc

Render the $tag_string

Upon this command subclasses should parse the $tag_string.

return void

@inheritdoc from method AbstractTag::render

public function render(): void
return void

GeneratedTag::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractSimpleTag::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

GeneratedTag::getDescription

predicates

public

inherited from

AbstractSimpleTag::getDescription

Get the <description>

public function getDescription(): ?string
return ?string

GeneratedTag::setDescription

predicates

public

inherited from

AbstractSimpleTag::setDescription

Set the <description>

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

GeneratedTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

GeneratedTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

GeneratedTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

GeneratedTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

GeneratedTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

GeneratedTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

GeneratedTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

GeneratedTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

InheritdocTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

Stringable | TagInterface

extends

AbstractSimpleTag

hierarchy

InheritdocTag -> AbstractSimpleTag -> AbstractTag

Represents the inheritdoc tag

syntax

@inheritdoc
{@inheritdoc}

Constants
InheritdocTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(11) "@inheritdoc"

Constructor
InheritdocTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
InheritdocTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

InheritdocTag::__toString

predicates

public

implements

Stringable::__toString

Returns a reStructuredText representation of inherited PHPDoc

If no inherited PHPDoc can be found, returns a placeholder string.

public function __toString(): string
return string - reStructuredText representation of inherited PHPDoc

InheritdocTag::render

predicates

public

implements

AbstractTag::render

inherited from

AbstractSimpleTag::render

Renders the description of simple tags

@inheritdoc

Render the $tag_string

Upon this command subclasses should parse the $tag_string.

return void

@inheritdoc from method AbstractTag::render

public function render(): void
return void

InheritdocTag::getDescription

predicates

public

inherited from

AbstractSimpleTag::getDescription

Get the <description>

public function getDescription(): ?string
return ?string

InheritdocTag::setDescription

predicates

public

inherited from

AbstractSimpleTag::setDescription

Set the <description>

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

InheritdocTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

InheritdocTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

InheritdocTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

InheritdocTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

InheritdocTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

InheritdocTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

InheritdocTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

InheritdocTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

InternalTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

TagInterface | Stringable

extends

AbstractSimpleTag

hierarchy

InternalTag -> AbstractSimpleTag -> AbstractTag

Represents the internal tag

syntax

@internal [description]
{@internal [description]}

see also

PSR-19 @internal


Constants
InternalTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(9) "@internal"

Constructor
InternalTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
InternalTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

InternalTag::render

predicates

public

implements

AbstractTag::render

inherited from

AbstractSimpleTag::render

Renders the description of simple tags

@inheritdoc

Render the $tag_string

Upon this command subclasses should parse the $tag_string.

return void

@inheritdoc from method AbstractTag::render

public function render(): void
return void

InternalTag::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractSimpleTag::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

InternalTag::getDescription

predicates

public

inherited from

AbstractSimpleTag::getDescription

Get the <description>

public function getDescription(): ?string
return ?string

InternalTag::setDescription

predicates

public

inherited from

AbstractSimpleTag::setDescription

Set the <description>

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

InternalTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

InternalTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

InternalTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

InternalTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

InternalTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

InternalTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

InternalTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

InternalTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

LicenseTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

TagInterface | Stringable

extends

AbstractLinkTag

hierarchy

LicenseTag -> AbstractLinkTag -> AbstractTag

Represents the license tag

syntax

@license [URI] [description]

Constants
LicenseTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(8) "@license"

Constructor
LicenseTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
LicenseTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

LicenseTag::render

predicates

public

implements

AbstractTag::render

inherited from

AbstractLinkTag::render

Renders the tag

syntax

@tag_name [URI] [description]
{@tag_name [URI] [description]}
public function render(): void
return void

LicenseTag::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractLinkTag::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

LicenseTag::getUri

predicates

public

inherited from

AbstractLinkTag::getUri

public function getUri(): ?string
return ?string

LicenseTag::setUri

predicates

public

inherited from

AbstractLinkTag::setUri

public function setUri(
      Parameter #0 [ <required> ?string $uri ]
 ): void
param ?string $uri
return void

LicenseTag::getDescription

predicates

public

inherited from

AbstractLinkTag::getDescription

public function getDescription(): ?string
return ?string

LicenseTag::setDescription

predicates

public

inherited from

AbstractLinkTag::setDescription

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

LicenseTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

LicenseTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

LicenseTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

LicenseTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

LicenseTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

LicenseTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

LicenseTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

LicenseTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

LinkTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

TagInterface | Stringable

extends

AbstractLinkTag

hierarchy

LinkTag -> AbstractLinkTag -> AbstractTag

Represents the link tag

syntax

@link [URI] [description]
{@link [URI] [description]}

see also

PSR-19 @link


Constants
LinkTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(5) "@link"

Constructor
LinkTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
LinkTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

LinkTag::render

predicates

public

implements

AbstractTag::render

inherited from

AbstractLinkTag::render

Renders the tag

syntax

@tag_name [URI] [description]
{@tag_name [URI] [description]}
public function render(): void
return void

LinkTag::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractLinkTag::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

LinkTag::getUri

predicates

public

inherited from

AbstractLinkTag::getUri

public function getUri(): ?string
return ?string

LinkTag::setUri

predicates

public

inherited from

AbstractLinkTag::setUri

public function setUri(
      Parameter #0 [ <required> ?string $uri ]
 ): void
param ?string $uri
return void

LinkTag::getDescription

predicates

public

inherited from

AbstractLinkTag::getDescription

public function getDescription(): ?string
return ?string

LinkTag::setDescription

predicates

public

inherited from

AbstractLinkTag::setDescription

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

LinkTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

LinkTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

LinkTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

LinkTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

LinkTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

LinkTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

LinkTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

LinkTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

PackageTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

Stringable | TagInterface

extends

AbstractTag

hierarchy

PackageTag -> AbstractTag

Represents the package tag

syntax

@package [level 1]\[level 2]\[etc.]

see also

PSR-19 @package


Constants
PackageTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(8) "@package"

Constructor
PackageTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
PackageTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

PackageTag::render

predicates

public

implements

AbstractTag::render

Renders the package tag

syntax

@package [level 1]\[level 2]\[etc.]
public function render(): void
return void

PackageTag::__toString

predicates

public

implements

Stringable::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

PackageTag::getSubdivision

predicates

public

public function getSubdivision(): ?string
return ?string

PackageTag::setSubdivision

predicates

public

public function setSubdivision(
      Parameter #0 [ <required> ?string $subdivision ]
 ): void
param ?string $subdivision
return void

PackageTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

PackageTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

PackageTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

PackageTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

PackageTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

PackageTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

PackageTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

PackageTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

ParamTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

Stringable | TagInterface

extends

AbstractTypeTag

hierarchy

ParamTag -> AbstractTypeTag -> AbstractLinkTag -> AbstractTag

known subclasses

VarTag

Represents the param tag

syntax

@param ["Type"] $[name] [<description>]

see also

PSR-19 @param


Constants
ParamTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(6) "@param"

Constructor
ParamTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
ParamTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

ParamTag::render

predicates

public

implements

AbstractTag::render

Renders a named type Tag

syntax

@tag_name ["Type"] $[name] [<description>]
public function render(): void
return void

ParamTag::__toString

predicates

public

implements

Stringable::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

ParamTag::getName

predicates

public

public function getName(): ?string
return ?string

ParamTag::setName

predicates

public

public function setName(
      Parameter #0 [ <required> ?string $name ]
 ): void
param ?string $name
return void

ParamTag::getType

predicates

public

inherited from

AbstractTypeTag::getType

public function getType(): ?string
return ?string

ParamTag::setType

predicates

public

inherited from

AbstractTypeTag::setType

public function setType(
      Parameter #0 [ <required> ?string $type ]
 ): void
param ?string $type
return void

ParamTag::getUri

predicates

public

inherited from

AbstractLinkTag::getUri

public function getUri(): ?string
return ?string

ParamTag::setUri

predicates

public

inherited from

AbstractLinkTag::setUri

public function setUri(
      Parameter #0 [ <required> ?string $uri ]
 ): void
param ?string $uri
return void

ParamTag::getDescription

predicates

public

inherited from

AbstractLinkTag::getDescription

public function getDescription(): ?string
return ?string

ParamTag::setDescription

predicates

public

inherited from

AbstractLinkTag::setDescription

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

ParamTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

ParamTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

ParamTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

ParamTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

ParamTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

ParamTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

ParamTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

ParamTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

ReturnTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

TagInterface | Stringable

extends

AbstractTypeTag

hierarchy

ReturnTag -> AbstractTypeTag -> AbstractLinkTag -> AbstractTag

Represents the return tag

syntax

@return <"Type"> [description]

see also

PSR-19 @return


Constants
ReturnTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(7) "@return"

Constructor
ReturnTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
ReturnTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

ReturnTag::render

predicates

public

implements

AbstractTag::render

inherited from

AbstractTypeTag::render

Renders a typed tag

syntax

@tag_name <"Type"> [description]
public function render(): void
return void

ReturnTag::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractTypeTag::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

ReturnTag::getType

predicates

public

inherited from

AbstractTypeTag::getType

public function getType(): ?string
return ?string

ReturnTag::setType

predicates

public

inherited from

AbstractTypeTag::setType

public function setType(
      Parameter #0 [ <required> ?string $type ]
 ): void
param ?string $type
return void

ReturnTag::getUri

predicates

public

inherited from

AbstractLinkTag::getUri

public function getUri(): ?string
return ?string

ReturnTag::setUri

predicates

public

inherited from

AbstractLinkTag::setUri

public function setUri(
      Parameter #0 [ <required> ?string $uri ]
 ): void
param ?string $uri
return void

ReturnTag::getDescription

predicates

public

inherited from

AbstractLinkTag::getDescription

public function getDescription(): ?string
return ?string

ReturnTag::setDescription

predicates

public

inherited from

AbstractLinkTag::setDescription

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

ReturnTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

ReturnTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

ReturnTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

ReturnTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

ReturnTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

ReturnTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

ReturnTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

ReturnTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

SeeTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

TagInterface | Stringable

extends

AbstractLinkTag

hierarchy

SeeTag -> AbstractLinkTag -> AbstractTag

Represents the see tag

syntax

@see [URI | "FQSEN"] [<description>]

see also

PSR-19 @see


Constants
SeeTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(4) "@see"

Constructor
SeeTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
SeeTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

SeeTag::render

predicates

public

implements

AbstractTag::render

inherited from

AbstractLinkTag::render

Renders the tag

syntax

@tag_name [URI] [description]
{@tag_name [URI] [description]}
public function render(): void
return void

SeeTag::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractLinkTag::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

SeeTag::getUri

predicates

public

inherited from

AbstractLinkTag::getUri

public function getUri(): ?string
return ?string

SeeTag::setUri

predicates

public

inherited from

AbstractLinkTag::setUri

public function setUri(
      Parameter #0 [ <required> ?string $uri ]
 ): void
param ?string $uri
return void

SeeTag::getDescription

predicates

public

inherited from

AbstractLinkTag::getDescription

public function getDescription(): ?string
return ?string

SeeTag::setDescription

predicates

public

inherited from

AbstractLinkTag::setDescription

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

SeeTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

SeeTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

SeeTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

SeeTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

SeeTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

SeeTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

SeeTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

SeeTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

SinceTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

TagInterface | Stringable

extends

AbstractVersionTag

hierarchy

SinceTag -> AbstractVersionTag -> AbstractSimpleTag -> AbstractTag

Represents the since tag

syntax

@since [<"Semantic Version">] [<description>]

see also

PSR-19 @since


Constants
SinceTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(6) "@since"

Constructor
SinceTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
SinceTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

SinceTag::render

predicates

public

implements

AbstractTag::render

inherited from

AbstractVersionTag::render

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.

return void

@inheritdoc from method AbstractTag::render

public function render(): void
return void

SinceTag::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractVersionTag::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

SinceTag::getSemanticVersion

predicates

public

inherited from

AbstractVersionTag::getSemanticVersion

Get the [<”Semantic Version”>]

public function getSemanticVersion(): ?string
return ?string

SinceTag::setSemanticVersion

predicates

public

inherited from

AbstractVersionTag::setSemanticVersion

Set the [<”Semantic Version”>]

public function setSemanticVersion(
      Parameter #0 [ <required> string $semantic_version ]
 ): void
param string $semantic_version
return void

SinceTag::getDescription

predicates

public

inherited from

AbstractSimpleTag::getDescription

Get the <description>

public function getDescription(): ?string
return ?string

SinceTag::setDescription

predicates

public

inherited from

AbstractSimpleTag::setDescription

Set the <description>

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

SinceTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

SinceTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

SinceTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

SinceTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

SinceTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

SinceTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

SinceTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

SinceTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

TagFactory

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable


Methods
TagFactory::resolveTags

predicates

public | static

Resolve PHPDoc representations of tags to their reStructuredText representation

public static function resolveTags(
      Parameter #0 [ <required> string $line ]
 ): string
param string $line - string [with PHPDoc tags]
return string - string with @internal rendered reStructuredText representation

TagFactory::explodeOnTags

predicates

public | static

Split a line on inline tags

This is a recursive function. Example:

before: "Gets the {@link BarClass} out of the {@link Foo::method}"

after : ["Gets the ", "{@link BarClass}", " out of the ", "{@link Foo::method}"]
public static function explodeOnTags(
      Parameter #0 [ <required> string $line ]
      Parameter #1 [ <optional> array $parts = [] ]
 ): array
param string $line - any string
param array $parts - optional - any array
return array - with $line exploded on inline tags

TagFactory::resolveInlineTags

predicates

public | static

public static function resolveInlineTags(
      Parameter #0 [ <required> array $parts ]
 ): array
param array $parts
return array

TagFactory::getTagImplementation

predicates

public | static

public static function getTagImplementation(
      Parameter #0 [ <required> string $tag ]
 ): TagInterface|string
param string $tag
return 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
return string - reStructuredText representation of this Tag

TagInterface::getTagName

predicates

public | abstract

Gets the tag-name of this Tag

public abstract function getTagName(): string
return string - tag-name of this Tag

TagInterface::getDisplayName

predicates

public | abstract

Get the short version of this tagname, without the at-sign (@)

public abstract function getDisplayName(): string
return string - short version of this tagname

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
return bool - true if this is an inline link, false otherwise

TagInterface::getTagLength

predicates

public | abstract

Get the length (in characters) of this tagname

public abstract function getTagLength(): int
return int - length (in characters) of this tagname

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
return int - width (in characters) or -1 if not yet set

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
param int $max_width - width (in characters)
return void

Fri, 31 Mar 2023 13:22:46 +0000

ThrowsTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

TagInterface | Stringable

extends

AbstractTypeTag

hierarchy

ThrowsTag -> AbstractTypeTag -> AbstractLinkTag -> AbstractTag

Represents the throws tag

syntax

@throws ["Type"] [<description>]

see also

PSR-19 @throws


Constants
ThrowsTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(7) "@throws"

Constructor
ThrowsTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
ThrowsTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

ThrowsTag::render

predicates

public

implements

AbstractTag::render

inherited from

AbstractTypeTag::render

Renders a typed tag

syntax

@tag_name <"Type"> [description]
public function render(): void
return void

ThrowsTag::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractTypeTag::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

ThrowsTag::getType

predicates

public

inherited from

AbstractTypeTag::getType

public function getType(): ?string
return ?string

ThrowsTag::setType

predicates

public

inherited from

AbstractTypeTag::setType

public function setType(
      Parameter #0 [ <required> ?string $type ]
 ): void
param ?string $type
return void

ThrowsTag::getUri

predicates

public

inherited from

AbstractLinkTag::getUri

public function getUri(): ?string
return ?string

ThrowsTag::setUri

predicates

public

inherited from

AbstractLinkTag::setUri

public function setUri(
      Parameter #0 [ <required> ?string $uri ]
 ): void
param ?string $uri
return void

ThrowsTag::getDescription

predicates

public

inherited from

AbstractLinkTag::getDescription

public function getDescription(): ?string
return ?string

ThrowsTag::setDescription

predicates

public

inherited from

AbstractLinkTag::setDescription

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

ThrowsTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

ThrowsTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

ThrowsTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

ThrowsTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

ThrowsTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

ThrowsTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

ThrowsTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

ThrowsTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

TodoTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

TagInterface | Stringable

extends

AbstractSimpleTag

hierarchy

TodoTag -> AbstractSimpleTag -> AbstractTag

Represents the todo tag

syntax

@todo [description]

see also

PSR-19 @todo


Constants
TodoTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(5) "@todo"

Constructor
TodoTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
TodoTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

TodoTag::render

predicates

public

implements

AbstractTag::render

inherited from

AbstractSimpleTag::render

Renders the description of simple tags

@inheritdoc

Render the $tag_string

Upon this command subclasses should parse the $tag_string.

return void

@inheritdoc from method AbstractTag::render

public function render(): void
return void

TodoTag::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractSimpleTag::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

TodoTag::getDescription

predicates

public

inherited from

AbstractSimpleTag::getDescription

Get the <description>

public function getDescription(): ?string
return ?string

TodoTag::setDescription

predicates

public

inherited from

AbstractSimpleTag::setDescription

Set the <description>

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

TodoTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

TodoTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

TodoTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

TodoTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

TodoTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

TodoTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

TodoTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

TodoTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

UsesTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

TagInterface | Stringable

extends

AbstractTypeTag

hierarchy

UsesTag -> AbstractTypeTag -> AbstractLinkTag -> AbstractTag

Represents the uses tag

syntax

@uses [file | "FQSEN"] [<description>]

see also

PSR-19 @uses


Constants
UsesTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(5) "@uses"

Constructor
UsesTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
UsesTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

UsesTag::render

predicates

public

implements

AbstractTag::render

inherited from

AbstractTypeTag::render

Renders a typed tag

syntax

@tag_name <"Type"> [description]
public function render(): void
return void

UsesTag::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractTypeTag::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

UsesTag::getType

predicates

public

inherited from

AbstractTypeTag::getType

public function getType(): ?string
return ?string

UsesTag::setType

predicates

public

inherited from

AbstractTypeTag::setType

public function setType(
      Parameter #0 [ <required> ?string $type ]
 ): void
param ?string $type
return void

UsesTag::getUri

predicates

public

inherited from

AbstractLinkTag::getUri

public function getUri(): ?string
return ?string

UsesTag::setUri

predicates

public

inherited from

AbstractLinkTag::setUri

public function setUri(
      Parameter #0 [ <required> ?string $uri ]
 ): void
param ?string $uri
return void

UsesTag::getDescription

predicates

public

inherited from

AbstractLinkTag::getDescription

public function getDescription(): ?string
return ?string

UsesTag::setDescription

predicates

public

inherited from

AbstractLinkTag::setDescription

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

UsesTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

UsesTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

UsesTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

UsesTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

UsesTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

UsesTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

UsesTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

UsesTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

VarTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

TagInterface | Stringable

extends

ParamTag

hierarchy

VarTag -> ParamTag -> AbstractTypeTag -> AbstractLinkTag -> AbstractTag

Represents the var tag

syntax

@var ["Type"] [element_name] [<description>]

see also

PSR-19 @var


Constants
VarTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(4) "@var"

Constructor
VarTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
VarTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

VarTag::render

predicates

public

implements

AbstractTag::render

inherited from

ParamTag::render

Renders a named type Tag

syntax

@tag_name ["Type"] $[name] [<description>]
public function render(): void
return void

VarTag::__toString

predicates

public

implements

Stringable::__toString

inherited from

ParamTag::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

VarTag::getName

predicates

public

inherited from

ParamTag::getName

public function getName(): ?string
return ?string

VarTag::setName

predicates

public

inherited from

ParamTag::setName

public function setName(
      Parameter #0 [ <required> ?string $name ]
 ): void
param ?string $name
return void

VarTag::getType

predicates

public

inherited from

AbstractTypeTag::getType

public function getType(): ?string
return ?string

VarTag::setType

predicates

public

inherited from

AbstractTypeTag::setType

public function setType(
      Parameter #0 [ <required> ?string $type ]
 ): void
param ?string $type
return void

VarTag::getUri

predicates

public

inherited from

AbstractLinkTag::getUri

public function getUri(): ?string
return ?string

VarTag::setUri

predicates

public

inherited from

AbstractLinkTag::setUri

public function setUri(
      Parameter #0 [ <required> ?string $uri ]
 ): void
param ?string $uri
return void

VarTag::getDescription

predicates

public

inherited from

AbstractLinkTag::getDescription

public function getDescription(): ?string
return ?string

VarTag::setDescription

predicates

public

inherited from

AbstractLinkTag::setDescription

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

VarTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

VarTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

VarTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

VarTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

VarTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

VarTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

VarTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

VarTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000

VersionTag

namespace

bhenk\doc2rst\tag

predicates

Cloneable | Instantiable

implements

TagInterface | Stringable

extends

AbstractVersionTag

hierarchy

VersionTag -> AbstractVersionTag -> AbstractSimpleTag -> AbstractTag

Represents the version tag

syntax

@version [<"Semantic Version">] [<description>]

see also

PSR-19 @version


Constants
VersionTag::TAG

predicates

public

@inheritdoc

var string TAG - the name of this tag

@inheritdoc from AbstractTag::TAG

string(8) "@version"

Constructor
VersionTag::__construct

predicates

public | constructor

inherited from

AbstractTag::__construct

Construct a new Tag

The param $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 = '' ]
 )
param ?string $tag_string - string following syntax of this Tag class

Methods
VersionTag::getTagName

predicates

public

implements

TagInterface::getTagName

@inheritdoc

Gets the tag-name of this Tag

return string - tag-name of this Tag

@inheritdoc from method TagInterface::getTagName

public function getTagName(): string
return string - name of this Tag

VersionTag::render

predicates

public

implements

AbstractTag::render

inherited from

AbstractVersionTag::render

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.

return void

@inheritdoc from method AbstractTag::render

public function render(): void
return void

VersionTag::__toString

predicates

public

implements

Stringable::__toString

inherited from

AbstractVersionTag::__toString

Returns a reStructuredText representation of the contents of this Tag

public function __toString(): string
return string - reStructuredText representation of contents

VersionTag::getSemanticVersion

predicates

public

inherited from

AbstractVersionTag::getSemanticVersion

Get the [<”Semantic Version”>]

public function getSemanticVersion(): ?string
return ?string

VersionTag::setSemanticVersion

predicates

public

inherited from

AbstractVersionTag::setSemanticVersion

Set the [<”Semantic Version”>]

public function setSemanticVersion(
      Parameter #0 [ <required> string $semantic_version ]
 ): void
param string $semantic_version
return void

VersionTag::getDescription

predicates

public

inherited from

AbstractSimpleTag::getDescription

Get the <description>

public function getDescription(): ?string
return ?string

VersionTag::setDescription

predicates

public

inherited from

AbstractSimpleTag::setDescription

Set the <description>

public function setDescription(
      Parameter #0 [ <required> ?string $description ]
 ): void
param ?string $description
return void

VersionTag::getTagString

predicates

public

inherited from

AbstractTag::getTagString

Get the $tag_string

public function getTagString(): string
return string - string with which this Tag was constructed

VersionTag::getLine

predicates

public

inherited from

AbstractTag::getLine

Get the content of the $tag_string without the tag name and curly braces

public function getLine(): string
return string - content of the $tag_string

VersionTag::getDisplayName

predicates

public

implements

TagInterface::getDisplayName

inherited from

AbstractTag::getDisplayName

@inheritdoc

Get the short version of this tagname, without the at-sign (@)

return string - short version of this tagname

@inheritdoc from method TagInterface::getDisplayName

public function getDisplayName(): string
return string

VersionTag::isInline

predicates

public

implements

TagInterface::isInline

inherited from

AbstractTag::isInline

@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.

return bool - true if this is an inline link, false otherwise

@inheritdoc from method TagInterface::isInline

public function isInline(): bool
return bool

VersionTag::getTagLength

predicates

public

implements

TagInterface::getTagLength

inherited from

AbstractTag::getTagLength

@inheritdoc

Get the length (in characters) of this tagname

return int - length (in characters) of this tagname

@inheritdoc from method TagInterface::getTagLength

public function getTagLength(): int
return int

VersionTag::getGroupWidth

predicates

public

implements

TagInterface::getGroupWidth

inherited from

AbstractTag::getGroupWidth

@inheritdoc

Get the width (in characters) of the group in which this Tag will be displayed

return int - width (in characters) or -1 if not yet set

@inheritdoc from method TagInterface::getGroupWidth

public function getGroupWidth(): int
return int

VersionTag::setGroupWidth

predicates

public

implements

TagInterface::setGroupWidth

inherited from

AbstractTag::setGroupWidth

@inheritdoc

Set the width (in characters) of the group in which this Tag will be displayed

param int $max_width - width (in characters)
return void

@inheritdoc from method TagInterface::setGroupWidth

public function setGroupWidth(
      Parameter #0 [ <required> int $max_width ]
 ): void
param int $max_width
return void

VersionTag::toRst

predicates

public

implements

TagInterface::toRst

inherited from

AbstractTag::toRst

@inheritdoc

Express this Tag in reStructuredText

return string - reStructuredText representation of this Tag

@inheritdoc from method TagInterface::toRst

public function toRst(): string
return string

Fri, 31 Mar 2023 13:22:46 +0000


Fri, 31 Mar 2023 13:22:46 +0000

work

Depends on

Dependency invoked by

globals

PackageAnalyser | TypeLinker

log

PackageAnalyser | TypeLinker

rst

PackageAnalyser

Naive worker classes

Linker

namespace

bhenk\doc2rst\work

predicates

Cloneable | Instantiable


Methods
Linker::findInParameters

predicates

public | static

public static function findInParameters(
      Parameter #0 [ <required> string $type ]
 ): string|bool
param string $type
return string | bool

Linker::findFQCN

predicates

public | static

public static function findFQCN(
      Parameter #0 [ <required> string $type ]
 ): string
param string $type
return 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
param PhpParser $parser
param string $fqn
return void

PackageAnalyser::toRst

predicates

public

public function toRst(): Stringable|string
return Stringable | string

PackageAnalyser::getUses

predicates

public

public function getUses(): array
return 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
param string $path
return void

PhpParser::parseString

predicates

public

public function parseString(
      Parameter #0 [ <required> string $contents ]
 ): void
param string $contents
return void

PhpParser::parseTokens

predicates

public

public function parseTokens(
      Parameter #0 [ <required> array $tokens ]
 ): void
param array $tokens
return void

PhpParser::getFilename

predicates

public

public function getFilename(): ?string
return ?string

PhpParser::getShortName

predicates

public

public function getShortName(): ?string
return ?string

PhpParser::isInitialized

predicates

public

public function isInitialized(): bool
return bool

PhpParser::hasInlineHtml

predicates

public

public function hasInlineHtml(): bool
return bool

PhpParser::isPhp

predicates

public

public function isPhp(): bool
return bool

PhpParser::isPlainPhpFile

predicates

public

public function isPlainPhpFile(): bool
return bool

PhpParser::isClassFile

predicates

public

public function isClassFile(): bool
return bool

PhpParser::isInterfaceFile

predicates

public

public function isInterfaceFile(): bool
return bool

PhpParser::isTraitFile

predicates

public

public function isTraitFile(): bool
return bool

PhpParser::isEnumFile

predicates

public

public function isEnumFile(): bool
return bool

PhpParser::getFQName

predicates

public

public function getFQName(): ?string
return ?string

PhpParser::getNamespace

predicates

public

public function getNamespace(): ?Struct
return ?Struct

PhpParser::getUses

predicates

public

public function getUses(): array
return array

PhpParser::getClass

predicates

public

public function getClass(): ?Struct
return ?Struct

PhpParser::getInterface

predicates

public

public function getInterface(): ?Struct
return ?Struct

PhpParser::getTrait

predicates

public

public function getTrait(): ?Struct
return ?Struct

PhpParser::getEnum

predicates

public

public function getEnum(): ?Struct
return ?Struct

PhpParser::getConstants

predicates

public

public function getConstants(): array
return array

PhpParser::getVariables

predicates

public

public function getVariables(): array
return array

PhpParser::getFunctions

predicates

public

public function getFunctions(): array
return array

PhpParser::getReturn

predicates

public

public function getReturn(): ?Struct
return ?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
return ?PhpParser

ProcessState::setCurrentParser

predicates

public | static

public static function setCurrentParser(
      Parameter #0 [ <required> ?bhenk\doc2rst\work\PhpParser $current_parser ]
 ): void
param ?PhpParser $current_parser
return 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
param ?ReflectionClass $current_class
return 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
param ?ReflectionMethod $current_method
return void

ProcessState::getCurrentMethodStart

predicates

public | static

public static function getCurrentMethodStart(): int|bool
return int | bool

ProcessState::getCurrentMethodEnd

predicates

public | static

public static function getCurrentMethodEnd(): int|bool
return 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
param ?ReflectionClassConstant $current_constant
return void

ProcessState::getPointer

predicates

public | static

public static function getPointer(
      Parameter #0 [ <optional> bool $file_prefix = true ]
 ): string
param bool $file_prefix
return 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 ]
 )
param int $line
param ?string $name
param mixed $value
param int $doc_comment_start
param ?string $doc_comment

Methods
Struct::getLine

predicates

public

public function getLine(): int
return int

Struct::getName

predicates

public

public function getName(): string
return string

Struct::getValue

predicates

public

public function getValue(): mixed
return mixed

Struct::getType

predicates

public

public function getType(): string
return string

Struct::getDocComment

predicates

public

public function getDocComment(): ?string
return ?string

Struct::getDocCommentStart

predicates

public

public function getDocCommentStart(): int
return int

Struct::getDocCommentEnd

predicates

public

public function getDocCommentEnd(): int
return int

Struct::getDocCommentDistance

predicates

public

public function getDocCommentDistance(): int
return 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
param ReflectionType $reflectionType
return string - reStructuredText links and references

TypeLinker::resolveMultipleFQCN

predicates

public | static

Resolve multiple types to their representation as reStructuredText links and references

The array param $types can consist of strings (fully qualified), ReflectionClass, ReflectionMethod and ReflectionClassConstant.

public static function resolveMultipleFQCN(
      Parameter #0 [ <required> array $types ]
 ): array
param array $types - types to resolve
return array - reStructuredText links and references

TypeLinker::resolveFQCN

predicates

public | static

Resolve a type to its representation as reStructuredText link or reference

Strings given as param $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
param ReflectionClass | string $namedType - Class-like
param ReflectionMethod | ReflectionClassConstant | string | null $member - method or constant
param ?string $description - description, visible part of link
return string - reStructuredText link or reference

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
param ReflectionNamedType | ReflectionClass | string $namedType
param ReflectionMethod | ReflectionClassConstant | string | null $member
param ?string $description
return string | bool - false if it does not succeed, reference otherwise


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.

api_directory

Configuration option. Absolute path to the directory for api-documentation. doc2rst will populate this directory with generated rst-files.

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

RC::doc_root

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
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
vendor_directory

Configuration option. Absolute path to the directory that is usually one directory further than the application_root or source directory.

Indices and tables