Elgg  Version master
Public Member Functions | List of all members
Elgg\Upgrade\Result Class Reference

Result of a single BatchUpgrade run. More...

Public Member Functions

 addError ($message)
 Add new error message to the batch. More...
 
 getErrors ()
 Get error messages. More...
 
 addFailures (int $num=1)
 Increment failure count. More...
 
 getFailureCount ()
 Get count of failures within the current batch. More...
 
 addSuccesses (int $num=1)
 Set an item (or items) as successfully upgraded. More...
 
 getSuccessCount ()
 Get count of successfully upgraded items within the current batch. More...
 
 markComplete ()
 Mark the upgrade as complete (not necessarily successful) More...
 
 wasMarkedComplete ()
 Has the upgrade been marked complete? More...
 
 toArray ()
 Export to reports array. More...
 

Detailed Description

Result of a single BatchUpgrade run.

Definition at line 10 of file Result.php.

Member Function Documentation

Elgg\Upgrade\Result::addError (   $message)

Add new error message to the batch.

Parameters
string|string[]$message Error messages
Returns
void

Definition at line 27 of file Result.php.

Elgg\Upgrade\Result::addFailures ( int  $num = 1)

Increment failure count.

This must be called every time an item fails to get upgraded.

Parameters
int$numNumber of items (defaults to 1)
Returns
void

Definition at line 53 of file Result.php.

Elgg\Upgrade\Result::addSuccesses ( int  $num = 1)

Set an item (or items) as successfully upgraded.

Parameters
int$numAmount if items (defaults to one)
Returns
void

Definition at line 73 of file Result.php.

Elgg\Upgrade\Result::getErrors ( )

Get error messages.

Returns
array $errors Array of error messages

Definition at line 40 of file Result.php.

Elgg\Upgrade\Result::getFailureCount ( )

Get count of failures within the current batch.

Returns
int $failure_count Amount of failures

Definition at line 62 of file Result.php.

Elgg\Upgrade\Result::getSuccessCount ( )

Get count of successfully upgraded items within the current batch.

Returns
int $failure_count Amount of failures

Definition at line 82 of file Result.php.

Elgg\Upgrade\Result::markComplete ( )

Mark the upgrade as complete (not necessarily successful)

Returns
void

Definition at line 91 of file Result.php.

Elgg\Upgrade\Result::toArray ( )

Export to reports array.

Returns
array

Definition at line 109 of file Result.php.

Elgg\Upgrade\Result::wasMarkedComplete ( )

Has the upgrade been marked complete?

Returns
bool

Definition at line 100 of file Result.php.


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