Elgg  Version 3.0
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 ($num=1)
 Increment failure count. More...
 
 getFailureCount ()
 Get count of failures within the current batch. More...
 
 addSuccesses ($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 8 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 24 of file Result.php.

Elgg\Upgrade\Result::addFailures (   $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 49 of file Result.php.

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

Set an item (or items) as successfully upgraded.

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

Definition at line 68 of file Result.php.

Elgg\Upgrade\Result::getErrors ( )

Get error messages.

Returns
array $errors Array of error messages

Definition at line 37 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 58 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 77 of file Result.php.

Elgg\Upgrade\Result::markComplete ( )

Mark the upgrade as complete (not necessarily successful)

Returns
void

Definition at line 86 of file Result.php.

Elgg\Upgrade\Result::toArray ( )

Export to reports array.

Returns
array

Definition at line 104 of file Result.php.

Elgg\Upgrade\Result::wasMarkedComplete ( )

Has the upgrade been marked complete?

Returns
bool

Definition at line 96 of file Result.php.


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