src/Converter/FileConverter.php
public function convert(string $outputFile, string $format, array $params = array()): ExportResult
    {
        try {
            $this->getVerb()->setOutputFile($outputFile)
                ->setFormat($format)
                ->setParameters($params);

            $result = self::getCommand()->execute($this->getVerb());
            if (!$result->isSuccess()) {
                if ($result->hasException()) {
                    throw $result->getException();
                }
                throw new \RuntimeException('Unknown error: ', $result->getExitCode());
            }
            return $result;
        } catch (\Exception $e) {
            throw new ConverterException('Conversion failed', ErrorCodes::EXECUTION_FAILURE, $e);
        }
    }
public function convert(string $outputFile, string $format, array $params = array()): ExportResult
    {
        try {
            $this->getVerb()->setOutputFile($outputFile)
                ->setFormat($format)
                ->setParameters($params);

            $result = self::getCommand()->execute($this->getVerb());
            if (!$result->isSuccess()) {
                if ($result->hasException()) {
                    throw $result->getException();
                }
                throw new \RuntimeException('Unknown error: ', $result->getExitCode());
            }
            return $result;
        } catch (\Exception $e) {
            throw new ConverterException('Conversion failed', ErrorCodes::EXECUTION_FAILURE, $e);
        }
    }
public function convert ( string $ outputFile , string $ format , array $ params = array ( ) ) : ExportResult { try { $ this -> getVerb ( ) -> setOutputFile ( $ outputFile ) -> setFormat ( $ format ) -> setParameters ( $ params ) ; $ result = self :: getCommand ( ) -> execute ( $ this -> getVerb ( ) ) ; if ( ! $ result -> isSuccess ( ) ) { if ( $ result -> hasException ( ) ) { throw $ result -> getException ( ) ; } throw new \ RuntimeException ( 'Unknown error: ' , $ result -> getExitCode ( ) ) ; } return $ result ; } catch ( \ Exception $ e ) { throw new ConverterException ( 'Conversion failed' , ErrorCodes :: EXECUTION_FAILURE , $ e ) ; } }
Convert a file

@param string $outputFile
@param string $format
@param array $params
@return \Assimp\Command\Result\ExportResult
@throws \Assimp\Converter\ConverterException
Convert a file