Public Member Functions | |
check_list ($ok_style, $nok_style, $warn_style='') | |
constructs a check_list | |
addItem ($result, $ok_string, $nok_string, $is_warning=false) | |
add a new report item | |
htmlReport () | |
display an html report as an unordered list | |
allOK () | |
were all operations successfull ?return true if all operations were successfull | |
hasWarning () | |
has one operation generated a warning ?return true if at least one operation was a warning | |
Public Attributes | |
$ok_style | |
success style | |
$nok_style | |
failure style | |
$warn_style | |
warning style | |
$style | |
list of styles | |
$text | |
list of text | |
$hasWarning | |
there was at least a warning, but we should be able to proceed | |
$allOK | |
there was at least a failure |
a check list is used when performing several actions that need report to the user when everything's finished. you use it by constructing it with 2 different styles. Then for each actions, you call addItem() with a boolean indicating the success or failure of the operation, and 2 strings. Finally when you're done and want to display result to user, you call htmlReport()
check_list::addItem | ( | $ | result, | |
$ | ok_string, | |||
$ | nok_string, | |||
$ | is_warning = false | |||
) |
add a new report item
result | result of the operation | |
ok_string | the string to display if result was true | |
nok_string | the string to display if result was false | |
is_warning | indicates if the error must be handled as a fatal error or a warning |
check_list::allOK | ( | ) |
were all operations successfull ?return true if all operations were successfull
check_list::check_list | ( | $ | ok_style, | |
$ | nok_style, | |||
$ | warn_style = '' | |||
) |
constructs a check_list
ok_style | success style to use for report | |
nok_style | failure style to use for report | |
warn_style | warn style to use for report |
check_list::hasWarning | ( | ) |
has one operation generated a warning ?return true if at least one operation was a warning
check_list::htmlReport | ( | ) |
display an html report as an unordered list
check_list::$allOK |
there was at least a failure
check_list::$hasWarning |
there was at least a warning, but we should be able to proceed
check_list::$nok_style |
failure style
check_list::$ok_style |
success style
check_list::$style |
list of styles
check_list::$text |
list of text
check_list::$warn_style |
warning style