RenderGuide
extends WriterAbstract
in package
implements
WithCustomSettings
FinalYes
Base class for the actual transformation business logic (writers).
Tags
Table of Contents
Interfaces
- WithCustomSettings
- Declares that the service implementing this interface yields its own settings.
Constants
- FEATURE_FLAG = 'guides.enabled'
Properties
- $commandBus : CommandBus
- $environmentBuilder : EnvironmentBuilder
- $environmentFactory : EnvironmentFactory
- $flySystemFactory : FlySystemFactory
- $logger : LoggerInterface
Methods
- __construct() : mixed
- __toString() : string
- checkRequirements() : void
- This method verifies whether PHP has all requirements needed to run this writer.
- getDefaultSettings() : array<string, bool|string>
- getName() : string
- Name of this writer, used to identify this writer.
- transform() : void
- Abstract definition of the transformation method.
- completedRenderingSetMessage() : void
- renderDocumentationSet() : void
- startRenderingSetMessage() : Stopwatch
Constants
FEATURE_FLAG
public
mixed
FEATURE_FLAG
= 'guides.enabled'
Properties
$commandBus
private
CommandBus
$commandBus
$environmentBuilder
private
EnvironmentBuilder
$environmentBuilder
$environmentFactory
private
EnvironmentFactory
$environmentFactory
$flySystemFactory
private
FlySystemFactory
$flySystemFactory
$logger
private
LoggerInterface
$logger
Methods
__construct()
public
__construct(LoggerInterface $logger, CommandBus $commandBus, FlySystemFactory $flySystemFactory, EnvironmentFactory $environmentFactory, EnvironmentBuilder $environmentBuilder) : mixed
Parameters
- $logger : LoggerInterface
- $commandBus : CommandBus
- $flySystemFactory : FlySystemFactory
- $environmentFactory : EnvironmentFactory
- $environmentBuilder : EnvironmentBuilder
__toString()
public
__toString() : string
Return values
stringcheckRequirements()
This method verifies whether PHP has all requirements needed to run this writer.
public
checkRequirements() : void
If one of the requirements is missing for this Writer then an exception of type RequirementMissing should be thrown; this indicates to the calling process that this writer will not function.
Tags
getDefaultSettings()
public
getDefaultSettings() : array<string, bool|string>
Return values
array<string, bool|string>getName()
Name of this writer, used to identify this writer.
public
getName() : string
This name is also used in Collection as key and should match the name provided in the template definitions' transformations.
Return values
stringtransform()
Abstract definition of the transformation method.
public
transform(Transformation $transformation, ProjectDescriptor $project, DocumentationSetDescriptor $documentationSet) : void
Parameters
- $transformation : Transformation
-
Transformation to execute.
- $project : ProjectDescriptor
-
Document containing the structure.
- $documentationSet : DocumentationSetDescriptor
completedRenderingSetMessage()
private
completedRenderingSetMessage(Stopwatch $stopwatch, Dsn $dsn) : void
Parameters
- $stopwatch : Stopwatch
- $dsn : Dsn
renderDocumentationSet()
private
renderDocumentationSet(GuideSetDescriptor $documentationSet, Transformation $transformation) : void
Parameters
- $documentationSet : GuideSetDescriptor
- $transformation : Transformation
startRenderingSetMessage()
private
startRenderingSetMessage(Dsn $dsn) : Stopwatch
Parameters
- $dsn : Dsn