PHP Class H2P\Converter\ConverterAbstract

显示文件 Open project: kriansa/h2p

Protected Properties

Property Type Description
$options array Options available to the Converter

Public Methods

Method Description
convert ( string | H2P\Request | H2P\TempFile $origin, string | H2P\TempFile $destination ) Convert the file, passing the right arguments to the Converter::transform (proxy pattern)
getOption ( $option ) : mixed Get an specific option
getOptions ( ) : array Return all the options set
setOption ( string $option, mixed $value ) : ConverterAbstract Set an option
setOptions ( array $options ) : ConverterAbstract Set multiple options from an array

Protected Methods

Method Description
transform ( H2P\Request $origin, string $destination ) : boolean Convert the URI to destination with the specified options

Method Details

convert() public method

Convert the file, passing the right arguments to the Converter::transform (proxy pattern)
public convert ( string | H2P\Request | H2P\TempFile $origin, string | H2P\TempFile $destination )
$origin string | H2P\Request | H2P\TempFile
$destination string | H2P\TempFile

getOption() public method

Get an specific option
public getOption ( $option ) : mixed
$option
return mixed

getOptions() public method

Return all the options set
public getOptions ( ) : array
return array

setOption() public method

Set an option
public setOption ( string $option, mixed $value ) : ConverterAbstract
$option string
$value mixed
return ConverterAbstract $this

setOptions() public method

Set multiple options from an array
public setOptions ( array $options ) : ConverterAbstract
$options array
return ConverterAbstract $this

transform() abstract protected method

Convert the URI to destination with the specified options
abstract protected transform ( H2P\Request $origin, string $destination ) : boolean
$origin H2P\Request
$destination string The destination full path
return boolean

Property Details

$options protected_oe property

Options available to the Converter
protected array $options
return array