PHP Class Yosymfony\Spress\Core\DataWriter\FilesystemDataWriter

This data writer uses SNAPSHOT_PATH_PERMALINK for working with the path of the items. In case of binary item this data writer uses SNAPSHOT_PATH_SOURCE and SNAPSHOT_PATH_RELATIVE_AFTER_CONVERT.
Author: Victor Puertas ([email protected])
Inheritance: implements Yosymfony\Spress\Core\DataWriter\DataWriterInterface
显示文件 Open project: spress/spress Class Usage Examples

Protected Properties

Property Type Description
$filesystem
$outputDir

Public Methods

Method Description
__construct ( Symfony\Component\Filesystem\Filesystem $filesystem, string $outputDir ) Constructor.
setUp ( )
tearDown ( )
write ( Yosymfony\Spress\Core\DataSource\ItemInterface $item )

Protected Methods

Method Description
composeOutputPath ( $relativePath )
isWritable ( Yosymfony\Spress\Core\DataSource\ItemInterface $item )

Method Details

__construct() public method

Constructor.
public __construct ( Symfony\Component\Filesystem\Filesystem $filesystem, string $outputDir )
$filesystem Symfony\Component\Filesystem\Filesystem
$outputDir string The output folder. e.g: "build"

composeOutputPath() protected method

protected composeOutputPath ( $relativePath )

isWritable() protected method

protected isWritable ( Yosymfony\Spress\Core\DataSource\ItemInterface $item )
$item Yosymfony\Spress\Core\DataSource\ItemInterface

setUp() public method

Removes the whole content of the output dir but VCS files.
public setUp ( )

tearDown() public method

public tearDown ( )

write() public method

public write ( Yosymfony\Spress\Core\DataSource\ItemInterface $item )
$item Yosymfony\Spress\Core\DataSource\ItemInterface

Property Details

$filesystem protected_oe property

protected $filesystem

$outputDir protected_oe property

protected $outputDir