Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
TransformationEngine Class Reference
+ Collaboration diagram for TransformationEngine:

Public Member Functions

 __construct ($host="localhost", $port=51968)
 
 sendTransformation ($te_name, $fkey, $filename, $callback, &$info)
 
 getInfo ($tid, &$info)
 
 getTransformation ($tid, $filename)
 
 getAndLeaveTransformation ($tid, $filename)
 
 eraseTransformation ($tid)
 

Data Fields

const error_connect = - 2
 
const error_noengine = - 3
 
const error_sendfile = - 4
 
const error_emptyfile = - 5
 
const error_convert = - 1
 
const status_inprogress = 2
 
const status_waiting = 3
 
const status_done = 1
 

Detailed Description

Definition at line 20 of file Class.TEClient.php.

Constructor & Destructor Documentation

__construct (   $host = "localhost",
  $port = 51968 
)

initialize host and port

Parameters
string$hosthost name
int$portport number

Definition at line 46 of file Class.TEClient.php.

Member Function Documentation

eraseTransformation (   $tid)

erase transformation delete associated files in the server engine

Parameters
string$tidTask identification
string$filenamethe path where put the file (must be writeable)
array&$infotransformation task info return "tid"=> ,"status"=> ,"comment=>
Returns
string error message, if no error empty string

Definition at line 362 of file Class.TEClient.php.

getAndLeaveTransformation (   $tid,
  $filename 
)

send a request for retrieve a transformation the status must be D (Done) or K (Done but errors). all working files are stayed into the server : be carreful to clean it after (use ::eraseTransformation)

Parameters
string$tidTask identification
string$filenamethe path where put the file (must be writeable)
Returns
string error message, if no error empty string

Definition at line 261 of file Class.TEClient.php.

getInfo (   $tid,
$info 
)

send a request to get information about a task

Parameters
int$tid_taskidentificator
array&$infotransformation task info return "tid"=> ,"status"=> ,"comment=>
Returns
string error message, if no error empty string

Definition at line 179 of file Class.TEClient.php.

getTransformation (   $tid,
  $filename 
)

send a request to retrieve a transformation and to erase task from server the status must be D (Done) or K (Done but errors).

Parameters
string$tidTask identification
string$filenamethe path where put the file (must be writeable)
Returns
string error message, if no error empty string

Definition at line 247 of file Class.TEClient.php.

+ Here is the call graph for this function:

sendTransformation (   $te_name,
  $fkey,
  $filename,
  $callback,
$info 
)

send a request to do a transformation

Parameters
string$te_nameEngine name
string$fkeyforeign key
string$filenamethe path where is the original file
string$callbackurl to activate after transformation is done
array&$infotransformation task info return "tid"=> ,"status"=> ,"comment=>
Returns
string error message, if no error empty string

Definition at line 61 of file Class.TEClient.php.

+ Here is the call graph for this function:

Field Documentation

const error_connect = - 2

Definition at line 22 of file Class.TEClient.php.

const error_convert = - 1

Definition at line 26 of file Class.TEClient.php.

const error_emptyfile = - 5

Definition at line 25 of file Class.TEClient.php.

const error_noengine = - 3

Definition at line 23 of file Class.TEClient.php.

const error_sendfile = - 4

Definition at line 24 of file Class.TEClient.php.

const status_done = 1

Definition at line 29 of file Class.TEClient.php.

const status_inprogress = 2

Definition at line 27 of file Class.TEClient.php.

const status_waiting = 3

Definition at line 28 of file Class.TEClient.php.


The documentation for this class was generated from the following file:
← centre documentaire © anakeen - published under CC License - Dynacase