Class humhub\modules\file\converter\TextConverter
Inheritance | humhub\modules\file\converter\TextConverter » humhub\modules\file\converter\BaseConverter » yii\base\BaseObject |
---|---|
Available since version | 1.3 |
Text Converter
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$converter | array | humhub\modules\file\converter\TextConverter | |
$file | humhub\modules\file\models\File | The file record | humhub\modules\file\converter\BaseConverter |
$options | array | humhub\modules\file\converter\BaseConverter |
Public Methods
Method | Description | Defined By |
---|---|---|
applyFile() | Sets file for the converter | humhub\modules\file\converter\BaseConverter |
getContentAsText() | Returns the file content as text | humhub\modules\file\converter\TextConverter |
getConverter() | Returns the first matching converter for the file | humhub\modules\file\converter\TextConverter |
getFilename() | Returns the filename of the converted file. | humhub\modules\file\converter\BaseConverter |
getUrl() | Returns the url to the converted file | humhub\modules\file\converter\BaseConverter |
init() | humhub\modules\file\converter\BaseConverter |
Protected Methods
Method | Description | Defined By |
---|---|---|
canConvert() | Returns if the given file can be converted | humhub\modules\file\converter\TextConverter |
convert() | Convert file | humhub\modules\file\converter\TextConverter |
Property Details
Method Details
Returns if the given file can be converted
protected void canConvert ( humhub\modules\file\models\File $file ) | ||
$file |
Convert file
protected void convert ( $fileName ) | ||
$fileName |
Returns the file content as text
public string getContentAsText ( ) | ||
return | string | The text output |
---|
Returns the first matching converter for the file
public array getConverter ( ) | ||
return | array | The converter definitions |
---|