add more documentation

This commit is contained in:
Uwe Steinmann 2023-01-04 14:31:59 +01:00
parent 2cbe041b60
commit 18ea59bfc7

View File

@ -29,6 +29,16 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
*/ */
protected $width; protected $width;
/**
* Create instance of image previewer
*
* @param string $previewDir path of base directory where all images are
* stored. This directory will have a subdirectory derived from the object id.
* @param integer $width default width of an image
* @param integer $timeout timeout for shell commands to create a preview image
* @param boolean $xsendfile if set to true the apache module xsendfile will
* be used.
*/
function __construct($previewDir, $width=40, $timeout=5, $xsendfile=true) { /* {{{ */ function __construct($previewDir, $width=40, $timeout=5, $xsendfile=true) { /* {{{ */
parent::__construct($previewDir, $timeout, $xsendfile); parent::__construct($previewDir, $timeout, $xsendfile);
$this->converters = array( $this->converters = array(
@ -46,7 +56,8 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
} /* }}} */ } /* }}} */
/** /**
* Return the physical filename of the preview image on disk * Return the physical filename of the preview image on disc
* including the path
* *
* @param object $object document content or document file * @param object $object document content or document file
* @param integer $width width of preview image * @param integer $width width of preview image
@ -103,6 +114,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
* @param string $mimetype MimeType of input file * @param string $mimetype MimeType of input file
* @param integer $width width of generated preview image * @param integer $width width of generated preview image
* @param string $target optional name of preview image (without extension) * @param string $target optional name of preview image (without extension)
* @param boolean $new will be set to true if the preview images was created
* @return boolean true on success, false on failure * @return boolean true on success, false on failure
*/ */
public function createRawPreview($infile, $dir, $mimetype, $width=0, $target='', &$new=false) { /* {{{ */ public function createRawPreview($infile, $dir, $mimetype, $width=0, $target='', &$new=false) { /* {{{ */
@ -171,6 +183,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
* @param object $object instance of SeedDMS_Core_DocumentContent * @param object $object instance of SeedDMS_Core_DocumentContent
* or SeedDMS_Core_DocumentFile * or SeedDMS_Core_DocumentFile
* @param integer $width desired width of preview image * @param integer $width desired width of preview image
* @param boolean $new will be set to true if the preview images was created
* @return boolean true on success, false on failure * @return boolean true on success, false on failure
*/ */
public function createPreview($object, $width=0, &$new=false) { /* {{{ */ public function createPreview($object, $width=0, &$new=false) { /* {{{ */