\phpDocumentor\Transformer\WriterSourcecode

Sourcecode transformation writer; generates syntax highlighted source files in a destination's subfolder.

Summary

Methods
Properties
Constants
checkRequirements()
transform()
__toString()
__construct()
No public properties found
No constants found
copy()
readSourceFile()
persistTo()
No protected properties found
N/A
copyDirectory()
stripFirstPartOfPath()
isGlobalTemplateReference()
normalizeSourcePath()
normalizeDestination()
$pathGenerator
N/A

Properties

$pathGenerator

$pathGenerator : \phpDocumentor\Transformer\Writer\PathGenerator

Type

PathGenerator

Methods

checkRequirements()

checkRequirements() : void

This method verifies whether PHP has all requirements needed to run this writer.

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.

Throws

\phpDocumentor\Transformer\Writer\Exception\RequirementMissing

When a requirements is missing stating which one.

transform()

transform(\phpDocumentor\Descriptor\ProjectDescriptor  $project, \phpDocumentor\Transformer\Transformation  $transformation) : void

This method writes every source code entry in the structure file to a highlighted file.

Parameters

\phpDocumentor\Descriptor\ProjectDescriptor $project

Document containing the structure.

\phpDocumentor\Transformer\Transformation $transformation

Transformation to execute.

__toString()

__toString() : string

Returns

string —

__construct()

__construct(\phpDocumentor\Transformer\Writer\PathGenerator  $pathGenerator) : mixed

Parameters

\phpDocumentor\Transformer\Writer\PathGenerator $pathGenerator

Returns

mixed —

copy()

copy(\phpDocumentor\Transformer\Transformation  $transformation, string  $path, string  $destination) : void

Parameters

\phpDocumentor\Transformer\Transformation $transformation
string $path
string $destination

readSourceFile()

readSourceFile(\phpDocumentor\Transformer\Transformation  $transformation, string  $path) : string

Parameters

\phpDocumentor\Transformer\Transformation $transformation
string $path

Returns

string —

persistTo()

persistTo(\phpDocumentor\Transformer\Transformation  $transformation, string  $path, string  $contents) : void

Parameters

\phpDocumentor\Transformer\Transformation $transformation
string $path
string $contents

copyDirectory()

copyDirectory(\phpDocumentor\Transformer\Transformation  $transformation, string  $path, string  $destination) : void

Parameters

\phpDocumentor\Transformer\Transformation $transformation
string $path
string $destination

stripFirstPartOfPath()

stripFirstPartOfPath(string  $path) : string

Parameters

string $path

Returns

string —

isGlobalTemplateReference()

isGlobalTemplateReference(string  $path) : bool

Parameters

string $path

Returns

bool —

normalizeSourcePath()

normalizeSourcePath(string  $path) : string

Parameters

string $path

Returns

string —

normalizeDestination()

normalizeDestination(string  $destination) : string

Parameters

string $destination

Returns

string —