PHP Class CloudConvert\Process

Author: Josias Montag ([email protected])
Inheritance: extends ApiObject
Mostra file Open project: cloudconvert/cloudconvert-php

Public Methods

Method Description
__construct ( Api $api, string $url ) : Process Construct a new Process instance
delete ( ) : Process Delete Process from API
download ( string $localfile = null, string $remotefile = null ) : Process Download process files from API
downloadAll ( string $directory = null ) : Process Download all output process files from API
downloadStream ( resource $stream, string $remotefile = null ) : Process Download process files from API and write to a given stream
start ( array $parameters ) : Process Starts the Process
upload ( $stream, string $filename = null ) : Process Uploads the input file. See https://cloudconvert.com/apidoc#upload
wait ( ) : Process Waits for the Process to finish (or end with an error)

Method Details

__construct() public method

Construct a new Process instance
public __construct ( Api $api, string $url ) : Process
$api Api
$url string The Process URL
return Process

delete() public method

Delete Process from API
public delete ( ) : Process
return Process

download() public method

Download process files from API
public download ( string $localfile = null, string $remotefile = null ) : Process
$localfile string Local file name (or directory) the file should be downloaded to
$remotefile string Remote file name which should be downloaded (if there are multiple output files available)
return Process

downloadAll() public method

Download all output process files from API
public downloadAll ( string $directory = null ) : Process
$directory string Local directory the files should be downloaded to
return Process

downloadStream() public method

Download process files from API and write to a given stream
public downloadStream ( resource $stream, string $remotefile = null ) : Process
$stream resource Stream to write the downloaded data to
$remotefile string Remote file name which should be downloaded (if there are multiple output files available)
return Process

start() public method

Starts the Process
public start ( array $parameters ) : Process
$parameters array Parameters for creating the Process. See https://cloudconvert.com/apidoc#start
return Process

upload() public method

Uploads the input file. See https://cloudconvert.com/apidoc#upload
public upload ( $stream, string $filename = null ) : Process
$filename string Filename of the input file
return Process

wait() public method

Waits for the Process to finish (or end with an error)
public wait ( ) : Process
return Process