A stored file's content.

Because stored files may contain binary data, they are not read with the likes of file_get_contents.

package Default
inherited_from \FeaturePhp\File\FileContent

 Methods

Creates a stored file's content.

__construct(string $fileSource) 

Parameters

$fileSource

string

Adds the stored file's content to a ZIP archive.

addToZip(\ZipArchive $zip, string $target) 

This is expected to be called only be a \FeaturePhp\Exporter\ZipExporter.

inherited_from \FeaturePhp\File\FileContent::addToZip()

Parameters

$zip

\ZipArchive

$target

string

the file target in the ZIP archive

Adds the file's content to a ZIP archive.

addToZip(\ZipArchive $zip, string $target) 
Inherited

This is expected to be called only be a \FeaturePhp\Exporter\ZipExporter.

Parameters

$zip

\ZipArchive

$target

string

the file target in the ZIP archive

Copies the stored file's content to the local filesystem.

copy(string $target) 

This is expected to be called only be a \FeaturePhp\Exporter\LocalExporter.

inherited_from \FeaturePhp\File\FileContent::copy()

Parameters

$target

string

the file target in the filesystem

Copies file's content to the local filesystem.

copy(string $target) 
Inherited

This is expected to be called only be a \FeaturePhp\Exporter\LocalExporter.

Parameters

$target

string

the file target in the filesystem

Returns the stored file's file source.

getFileSource() : string

Returns

string

Returns the stored file's path as a summary.

getSummary() : string

This returns no content of the stored file.

inherited_from \FeaturePhp\File\FileContent::getSummary()

Returns

string

Returns a summary of the file's content.

getSummary() : string
Inherited

The summary should be suitable for an overview of generated files, but does not necessarily contain the complete file content.

Returns

string

 Properties

 

a (relative) path to the file on the server

$fileSource : string

Default