mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
some more documentation
This commit is contained in:
parent
d8e9cb5707
commit
e54874c3ff
|
@ -72,18 +72,25 @@ class SeedDMS_ConversionMgr {
|
|||
* @param string $file name of file to convert
|
||||
* @param string $from mimetype of input file
|
||||
* @param string $to mimetype of output file
|
||||
* @param string $target name of target file. If none is given the
|
||||
* content of the converted document will be returned.
|
||||
* @param array $params additional parameter needed for the conversion,
|
||||
* e.g. the width of an image
|
||||
*
|
||||
* @return boolean true on success, other false
|
||||
*/
|
||||
public function convert($file, $from, $to, $target=null, $params=array()) {
|
||||
public function convert($file, $from, $to, $target=null, $params=array()) { /* {{{ */
|
||||
if(isset($this->services[$from][$to])) {
|
||||
$services = $this->services[$from][$to];
|
||||
for(end($services); key($services)!==null; prev($services)) {
|
||||
$service = current($services);
|
||||
$text = $service->convert($file, $target, $params);
|
||||
if($text !== false)
|
||||
if($text === false)
|
||||
return false;
|
||||
if($text)
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} /* }}} */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user