Stores the information about the allocation process.
More...
|
|
const | STATUS_CONFIGURED = 3 |
| | scheduled allocation was configured (to be executed later, for example)
|
| |
|
const | STATUS_EXECUTED = 1 |
| | allocation was successfully executed
|
| |
|
const | STATUS_FAILED = 2 |
| | a serious error has occurred during the allocation (as a hole)
|
| |
|
const | STATUS_VOID = 0 |
| | the init() called successfully but no actual allocation was done
|
| |
|
|
workshop_allocator | $allocator |
| | the instance of the allocator that produced this result
|
| |
| array | $logs = array() |
| | of log message objects, {
|
| |
|
null string | $message = null |
| | optional result message to display
|
| |
|
null int | $status = null |
| | the status of the init() call
|
| |
|
int | $timeend = null |
| | the timestamp of when the final status was set
|
| |
|
int | $timestart = null |
| | the timestamp of when the allocation process started
|
| |
Stores the information about the allocation process.
Allocator's method init() returns instance of this class.
◆ __construct()
Creates new instance of the object.
- Parameters
-
◆ get_logs()
| workshop_allocation_result::get_logs |
( |
| ) |
|
Returns list of logged messages.
Each object in the list has public properties message string, text to display type string, the type of the message indent int, indentation level
- See also
- self::log()
- Return values
-
◆ get_message()
| workshop_allocation_result::get_message |
( |
| ) |
|
- Return values
-
| string|null | status message |
◆ get_status()
| workshop_allocation_result::get_status |
( |
| ) |
|
- Return values
-
| int|null | the result status |
◆ get_timeend()
| workshop_allocation_result::get_timeend |
( |
| ) |
|
- Return values
-
| int|null | the timestamp of when the final status was set |
◆ log()
| workshop_allocation_result::log |
( |
| $message, |
|
|
| $type = 'ok', |
|
|
| $indent = 0 ) |
Appends a new message to the log.
The available levels are ok - success, eg. new allocation was created info - informational message error - error message, eg. no more peers available debug - debugging info
- Parameters
-
| string | $message | message text to display |
| string | $type | the type of the message |
| int | $indent | eventual indentation level (the message is related to the previous one with the lower indent) |
◆ set_status()
| workshop_allocation_result::set_status |
( |
| $status, |
|
|
| $message = null ) |
Sets the result status of the allocation.
- Parameters
-
| int | $status | the status code, eg self::STATUS_OK |
| string | $message | optional status message |
◆ $logs
| array workshop_allocation_result::$logs = array() |
|
protected |
of log message objects, {
- See also
- self::log()}
The documentation for this class was generated from the following file:
- mod/workshop/allocation/lib.php