PHP Class Elgg\Upgrade\Result

Show file Open project: elgg/elgg Class Usage Examples

Public Methods

Method Description
addError ( string $message ) : void Add new error message to the batch
addFailures ( integer $num = 1 ) : void Increment failure count
addSuccesses ( integer $num = 1 ) : void Set an item (or items) as successfully upgraded
getErrors ( ) : array Get error messages
getFailureCount ( ) Get count of failures within the current batch
getSuccessCount ( ) Get count of successfully upgraded items within the current batch

Method Details

addError() public method

Add new error message to the batch
public addError ( string $message ) : void
$message string Error message
return void

addFailures() public method

This must be called every time an item fails to get upgraded.
public addFailures ( integer $num = 1 ) : void
$num integer Number of items (defaults to 1)
return void

addSuccesses() public method

Set an item (or items) as successfully upgraded
public addSuccesses ( integer $num = 1 ) : void
$num integer Amount if items (defaults to one)
return void

getErrors() public method

Get error messages
public getErrors ( ) : array
return array $errors Array of error messages

getFailureCount() public method

Get count of failures within the current batch
public getFailureCount ( )

getSuccessCount() public method

Get count of successfully upgraded items within the current batch
public getSuccessCount ( )