add more documentation, add fold marks

This commit is contained in:
Uwe Steinmann 2016-11-05 12:39:57 +01:00
parent 5ee4253fe0
commit 674de91419

View File

@ -50,7 +50,7 @@ class SeedDMS_Preview_Previewer {
*/
protected $timeout;
function __construct($previewDir, $width=40, $timeout=5) {
function __construct($previewDir, $width=40, $timeout=5) { /* {{{ */
if(!is_dir($previewDir)) {
if (!SeedDMS_Core_File::makeDir($previewDir)) {
$this->previewDir = '';
@ -73,7 +73,7 @@ class SeedDMS_Preview_Previewer {
'application/x-compressed-tar' => "tar tzvf '%f' | convert -density 100 -resize %wx text:-[0] '%o",
);
$this->timeout = intval($timeout);
}
} /* }}} */
static function execWithTimeout($cmd, $timeout=5) { /* {{{ */
$descriptorspec = array(
@ -114,6 +114,9 @@ class SeedDMS_Preview_Previewer {
/**
* Set a list of converters
*
* Merges the list of passed converters with the already existing ones.
* Existing converters will be overwritten.
*
* @param array list of converters. The key of the array contains the mimetype
* and the value is the command to be called for creating the preview
*/