mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 21:21:27 +00:00
iterate over all service until a working one is found
This commit is contained in:
parent
29bf7cd062
commit
4abdb104f0
|
@ -62,8 +62,13 @@ class SeedDMS_ConversionMgr {
|
||||||
*/
|
*/
|
||||||
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])) {
|
if(isset($this->services[$from][$to])) {
|
||||||
$service = end($this->services[$from][$to]);
|
$services = $this->services[$from][$to];
|
||||||
return $service->convert($file, $target, $params);
|
for(end($services); key($services)!==null; prev($services)) {
|
||||||
|
$service = current($services);
|
||||||
|
$text = $service->convert($file, $target, $params);
|
||||||
|
if($text !== false)
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user