PHP Class Yosymfony\Spress\Core\ContentManager\Converter\ConverterManager

Author: Victor Puertas ([email protected])
Mostra file Open project: spress/spress Class Usage Examples

Public Methods

Method Description
__construct ( array $textExtensions = [] ) Constructor.
addConverter ( Yosymfony\Spress\Core\ContentManager\Converter\ConverterInterface $converter ) Adds a converter.
clearConverter ( ) Clears all converters registered.
convertContent ( string $content, string $inputExtension ) : Yosymfony\Spress\Core\ContentManager\Converter\ConverterResult Converts the content.
convertItem ( Yosymfony\Spress\Core\DataSource\ItemInterface $item ) : Yosymfony\Spress\Core\ContentManager\Converter\ConverterResult Converts an item. This method uses the SNAPSHOT_PATH_RELATIVE of Item path.
countConverter ( ) : integer Counts the converters registered.

Private Methods

Method Description
getConverter ( $extension )
initializeQueue ( )

Method Details

__construct() public method

Constructor.
public __construct ( array $textExtensions = [] )
$textExtensions array

addConverter() public method

Adds a converter.
public addConverter ( Yosymfony\Spress\Core\ContentManager\Converter\ConverterInterface $converter )
$converter Yosymfony\Spress\Core\ContentManager\Converter\ConverterInterface The converter

clearConverter() public method

Clears all converters registered.
public clearConverter ( )

convertContent() public method

Converts the content.
public convertContent ( string $content, string $inputExtension ) : Yosymfony\Spress\Core\ContentManager\Converter\ConverterResult
$content string The content
$inputExtension string The filename extension. e.g: 'html'
return Yosymfony\Spress\Core\ContentManager\Converter\ConverterResult

convertItem() public method

Converts an item. This method uses the SNAPSHOT_PATH_RELATIVE of Item path.
public convertItem ( Yosymfony\Spress\Core\DataSource\ItemInterface $item ) : Yosymfony\Spress\Core\ContentManager\Converter\ConverterResult
$item Yosymfony\Spress\Core\DataSource\ItemInterface The item
return Yosymfony\Spress\Core\ContentManager\Converter\ConverterResult

countConverter() public method

Counts the converters registered.
public countConverter ( ) : integer
return integer