\phpDocumentor\Plugin\Scrybe\Converter\RestructuredText\DirectivesImage

Directive used to process `.

. image::` 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.

Summary

Methods
Properties
Constants
toDocbook()
toXhtml()
No public properties found
No constants found
storeAsset()
getAssetManager()
$visitor
N/A
No private methods found
No private properties found
N/A

Properties

Methods

toDocbook()

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

Converts the Image directive to aDocBook image tag.

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

Parameters

\DOMDocument $document
\DOMElement $root

toXhtml()

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

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

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

Parameters

\DOMDocument $document
\DOMElement $root

storeAsset()

storeAsset() : void

Stores the asset in the asset manager.

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