RenderGuide
extends WriterAbstract
in package
implements
WithCustomSettings, Initializable, TemplateRenderer
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.
- Initializable
- TemplateRenderer
Properties
- $commandBus : CommandBus
- $environment : Environment
- $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.
- initialize() : void
- isTemplateFound() : bool
- renderTemplate() : string
- transform() : void
- Abstract definition of the transformation method.
- completedRenderingSetMessage() : void
- renderDocumentationSet() : void
- startRenderingSetMessage() : Stopwatch
Properties
$commandBus read-only
private
CommandBus
$commandBus
$environment
private
Environment
$environment
$environmentFactory read-only
private
EnvironmentFactory
$environmentFactory
$flySystemFactory read-only
private
FlySystemFactory
$flySystemFactory
$logger read-only
private
LoggerInterface
$logger
Methods
__construct()
public
__construct(LoggerInterface $logger, CommandBus $commandBus, FlySystemFactory $flySystemFactory, EnvironmentFactory $environmentFactory) : mixed
Parameters
- $logger : LoggerInterface
- $commandBus : CommandBus
- $flySystemFactory : FlySystemFactory
- $environmentFactory : EnvironmentFactory
__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
stringinitialize()
public
initialize(ProjectDescriptor $project, DocumentationSetDescriptor $documentationSet, Template $template) : void
Parameters
- $project : ProjectDescriptor
- $documentationSet : DocumentationSetDescriptor
- $template : Template
isTemplateFound()
public
isTemplateFound(RenderContext $context, string $template) : bool
Parameters
- $context : RenderContext
- $template : string
Return values
boolrenderTemplate()
public
renderTemplate(RenderContext $context, string $template[, array<string|int, mixed> $params = [] ]) : string
Parameters
- $context : RenderContext
- $template : string
- $params : array<string|int, mixed> = []
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