Figure

Extends \ezcDocumentRstFigureDirective

Directive used to process `.

. figure::` and collect images as assets to be copied.

The filenames of the images are taken from the directive and added onto the assets collection during the discovery phase. These assets may then be copied to the destination location by the invoker.

see
package

Default

Methods

Returns the asset manager.

getAssetManager() : \phpDocumentor\Plugin\Scrybe\Converter\Metadata\Assets

Stores the asset in the asset manager.

storeAsset() : void

This method takes an asset defined in the directive and stores that in the asset manager.

The following rules apply:

  1. The source of the asset is the relative path of the asset prefixed with a path based on the following rules:

    1. If the asset starts with a slash then the path is calculated from the project's root or
    2. if the asset does not start with a slash then the path is calculated from the file's directory.
  2. the destination of the asset is the path relative to the project root.

    1. When the asset starts with a slash then this equals that path without the leading slash.
    2. If not, the destination must be calculated by subtracting the project root from the current file's path and prepending that to the asset path (resolving ../ patterns in the mean time).

Converts the Image directive to aDocBook image tag.

toDocbook(\DOMDocument $document, \DOMElement $root) : void

This method takes an image directive and converts it into its DocBook representation and stores a reference in the Asset manager of the Converter.

see \phpDocumentor\Plugin\Scrybe\Converter\RestructuredText\Directives\ConverterInterface::getAssets()

for the asset manager

Arguments

$document

\DOMDocument

$root

\DOMElement

Converts the Image directive to an <img/> tag.

toXhtml(\DOMDocument $document, \DOMElement $root) : void

This method takes an image directive and converts it into its HTML representation and stores a reference in the Asset manager of the Converter.

see \phpDocumentor\Plugin\Scrybe\Converter\RestructuredText\Directives\ConverterInterface::getAssets()

for the asset manager

Arguments

$document

\DOMDocument

$root

\DOMElement

Properties

visitor

visitor : \phpDocumentor\Plugin\Scrybe\Converter\RestructuredText\Visitors\Discover