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