OpenMediaVault  3.0 (Erasmus)
The open network attached storage solution
Public Member Functions | List of all members
OMV\Rpc\BgStatusFile Class Reference

Public Member Functions

 __construct ($status)
 
 getPid ()
 
 isRunning ()
 
 hasError ()
 
 getError ()
 
 hasOutputFilename ()
 
 getOutputFilename ()
 
 get ($key)
 
 set ($key, $value)
 

Detailed Description

Helper class to handle the background process status.

Constructor & Destructor Documentation

OMV\Rpc\BgStatusFile::__construct (   $status)

Constructor

Parameters
statusAn array of status informations.

Member Function Documentation

OMV\Rpc\BgStatusFile::get (   $key)

Helper method to access the status fields.

Parameters
keyThe name of the status field.
Returns
The value of the given status field.
OMV\Rpc\BgStatusFile::getError ( )

Get the error object.

Returns
The error object containing the fields code, message and trace.
OMV\Rpc\BgStatusFile::getOutputFilename ( )

Get the name of the temporary file that contains the output of the background job.

Returns
Returns the name of the temporary file.
OMV\Rpc\BgStatusFile::getPid ( )

Get the PID of the background process.

Returns
The PID of the background process.
OMV\Rpc\BgStatusFile::hasError ( )

Check whether the background process is has thrown an error.

Returns
Returns TRUE if the background process has been thrown an error, otherwise FALSE.
OMV\Rpc\BgStatusFile::hasOutputFilename ( )

Check whether the background process output is written to a temporary file.

Returns
Returns TRUE if the background process writes his output to a temporary file, otherwise FALSE.
OMV\Rpc\BgStatusFile::isRunning ( )

Check whether the background process is running.

Returns
Returns TRUE if the background process is runnig, otherwise FALSE.
OMV\Rpc\BgStatusFile::set (   $key,
  $value 
)

Helper method to set the status fields.

Parameters
keyThe name of the status field.
valueThe value of the status field.
Returns
The value of the given status field.

The documentation for this class was generated from the following file: