phpDocumentor

FileIo extends WriterAbstract
in package
uses IoTrait

Writer containing file system operations.

The Query part of the transformation determines the action, currently supported is:

  • copy, copies a file or directory to the destination given in $artifact

Table of Contents

Methods

__toString()  : string
checkRequirements()  : void
This method verifies whether PHP has all requirements needed to run this writer.
getName()  : string
Name of this writer, used to identify this writer.
transform()  : void
Invokes the query method contained in this class.
copy()  : void
persistTo()  : void
readSourceFile()  : string
copyDirectory()  : void
isGlobalTemplateReference()  : bool
normalizeDestination()  : string
normalizeSourcePath()  : string
stripFirstPartOfPath()  : string

Methods

checkRequirements()

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
throws
RequirementMissing

When a requirements is missing stating which one.

codeCoverageIgnore

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
string

transform()

Invokes the query method contained in this class.

public transform(Transformation $transformation, ProjectDescriptor $project, DocumentationSetDescriptor $documentationSet) : void
Parameters
$transformation : Transformation

Transformation to execute.

$project : ProjectDescriptor

Document containing the structure.

$documentationSet : DocumentationSetDescriptor
Tags
throws
InvalidArgumentException

If the query is not supported.

throws
FileNotFoundException

If the source file does not exist or could not be read.

throws
FileExistsException

copy()

protected copy(Transformation $transformation, string $path, string $destination) : void
Parameters
$transformation : Transformation
$path : string
$destination : string

persistTo()

protected persistTo(Transformation $transformation, string $path, string $contents) : void
Parameters
$transformation : Transformation
$path : string
$contents : string

readSourceFile()

protected readSourceFile(Transformation $transformation, string $path) : string
Parameters
$transformation : Transformation
$path : string
Return values
string

copyDirectory()

private copyDirectory(Transformation $transformation, string $path, string $destination) : void
Parameters
$transformation : Transformation
$path : string
$destination : string

isGlobalTemplateReference()

private isGlobalTemplateReference(string $path) : bool
Parameters
$path : string
Return values
bool

normalizeDestination()

private normalizeDestination(string $destination) : string
Parameters
$destination : string
Return values
string

normalizeSourcePath()

private normalizeSourcePath(string $path) : string
Parameters
$path : string
Return values
string

stripFirstPartOfPath()

private stripFirstPartOfPath(string $path) : string
Parameters
$path : string
Return values
string

        
On this page

Search results