FileIo

in package
extends WriterAbstract 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

Interfaces, Classes & Used Traits

IoTrait

Methods

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

publiccheckRequirements() : 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.

Throws

\phpDocumentor\Transformer\Writer\Exception\RequirementMissing

When a requirements is missing stating which one.

Inherited from
\phpDocumentor\Transformer\Writer\WriterAbstract
codeCoverageIgnore

Invokes the query method contained in this class.

publictransform(ProjectDescriptor $project, Transformation $transformation) : void

Parameters

$project : ProjectDescriptor

Document containing the structure.

$transformation : Transformation

Transformation to execute.

Throws

\InvalidArgumentException

If the query is not supported.

\League\Flysystem\FileNotFoundException

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

\League\Flysystem\FileExistsException

public__toString() : string

Returns

string

protectedcopy(Transformation $transformation, string $path, string $destination) : void

Parameters

$transformation : Transformation
$path : string
$destination : string

protectedreadSourceFile(Transformation $transformation, string $path) : string

Parameters

$transformation : Transformation
$path : string

Returns

string

protectedpersistTo(Transformation $transformation, string $path, string $contents) : void

Parameters

$transformation : Transformation
$path : string
$contents : string

privatecopyDirectory(Transformation $transformation, string $path, string $destination) : void

Parameters

$transformation : Transformation
$path : string
$destination : string

privatestripFirstPartOfPath(string $path) : string

Parameters

$path : string

Returns

string

privateisGlobalTemplateReference(string $path) : bool

Parameters

$path : string

Returns

bool

privatenormalizeSourcePath(string $path) : string

Parameters

$path : string

Returns

string

privatenormalizeDestination(string $destination) : string

Parameters

$destination : string

Returns

string