25 lines
549 B
PHP
25 lines
549 B
PHP
<?php
|
|
namespace ktk\MediaServe;
|
|
|
|
class ErrorReporter {
|
|
|
|
static function onInit() {}
|
|
|
|
static function onRender() {
|
|
if (!MediaServe::$errors)
|
|
return;
|
|
echo '<div id="ktk_MediaServe_ErrorReporter">';
|
|
echo '<h1>ERRORS</h1>';
|
|
echo '<table>';
|
|
echo '<tr><th>context</th><th>error</th></tr>';
|
|
foreach (MediaServe::$errors as $context=>$error_context) {
|
|
foreach($error_context as $error) {
|
|
echo '<tr><td>'.$context.'</td><td>'.$error.'</td></tr>';
|
|
}
|
|
}
|
|
echo '</table>';
|
|
echo '</div>';
|
|
}
|
|
}
|
|
?>
|