A text file generated from a set of roles.

A refined file is a \FeaturePhp\File\TextFile generated by a \FeaturePhp\Generator\CollaborationGenerator. It is composed from several roles inside multiple collaborations, see \FeaturePhp\Collaboration\Role and \FeaturePhp\Collaboration\Collaboration.

package Default
inherited_from \FeaturePhp\File\TextFile

 Methods

Creates a refined file.

__construct(string $fileTarget, array<mixed,\FeaturePhp\Collaboration\Role> $roles) 
inherited_from \FeaturePhp\File\TextFile::__construct()

Parameters

$fileTarget

string

$roles

array<mixed,\FeaturePhp\Collaboration\Role>

Creates a file.

__construct(string $fileTarget) 
Inherited

Parameters

$fileTarget

string

Appends text content to the file.

append(string $content) 
Inherited

Parameters

$content

string

Returns the refined file's content.

getContent() : \FeaturePhp\File\FileContent

It is generated using an appropriate composition mechanism (see \FeaturePhp\Collaboration\Composer).

inherited_from \FeaturePhp\File\TextFile::getContent()

Returns

\FeaturePhp\File\FileContent

Returns the file's content.

getContent() : \FeaturePhp\File\FileContent
Inherited

Returns

\FeaturePhp\File\FileContent

Returns the file's target.

getTarget() : string
Inherited

Returns

string

 Properties

 

the content as text (usually UTF-8)

$content : string

Default

 

the file target in the generated product

$fileTarget : string

Default

 

all roles needed to refine this file

$roles : array<mixed,\FeaturePhp\Collaboration\Role>

Default