composer update

This commit is contained in:
Clemens Schwaighofer
2023-10-12 17:15:28 +09:00
parent c8aee19deb
commit 40f267f3dd
26 changed files with 1115 additions and 517 deletions

View File

@@ -35,19 +35,32 @@ print '<div><h1>' . $PAGE_NAME . '</h1></div>';
$em = new \CoreLibs\Logging\ErrorMessage($log);
print "Log ERROR: " . $log->prAr($em->getFlagLogError()) . "<br>";
print "FN: " . ml::fromName('Affe')->name . "<br>";
print "NU: " . ml::fromValue(100)->name . "<br>";
print "NU: " . ml::fromValue(1000)->name . "<br>";
$em->setErrorMsg('123', 'error', 'msg this is bad, not logged');
$em->setErrorMsg('123', 'error', 'msg this is bad, logged', log_error:true);
$em->setErrorMsg('123', 'error', 'msg this is bad, auto logged if debug');
$em->setErrorMsg('123', 'error', 'msg this is bad, auto logged if debug', 'target-id', 'other-style');
$em->setErrorMsg('123', 'error', 'msg this is bad, logged always', log_error:true);
$em->setErrorMsg('123', 'error', 'msg this is bad, never logged', log_error:false);
$em->setErrorMsg('1000', 'info', 'This is good');
$em->setErrorMsg('9999', 'abort', 'BAD: This is critical (abort)');
$em->setErrorMsg('10-1000', 'wrong', 'Wrong level: This is emergency');
// set some jump targets too
$em->setErrorMsg('100-1', 'error', 'Input wring', jump_target:['target' => 'foo-123', 'info' => 'Jump Target 123']);
$em->setErrorMsg('100-2', 'error', 'Input wring', jump_target:['target' => 'foo-123', 'info' => 'Jump Target 456']);
$em->setMessage('error', 'I have no id set', jump_target:['target' => 'bar-123', 'info' => 'Jump Bar']);
$em->setMessage('error', 'Jump empty', jump_target:['target' => 'bar-empty']);
print "ErrorsLast: <pre>" . $log->prAr($em->getLastErrorMsg()) . "</pre>";
print "ErrorsIds: <pre>" . $log->prAr($em->getErrorIds()) . "</pre>";
print "Errors: <pre>" . $log->prAr($em->getErrorMsg()) . "</pre>";
print "JumpTargets: <pre>" . $log->prAr($em->getJumpTarget()) . "</pre>";
print "</body></html>";
$log->debug('[END]', '==========================================>');
// __END__

View File

@@ -46,7 +46,13 @@ $image = BASE . LAYOUT . CONTENT_PATH . IMAGES . 'no_picture_square.jpg';
$cache_folder = BASE . LAYOUT . CONTENT_PATH . CACHE . IMAGES;
$web_folder = LAYOUT . CACHE . IMAGES;
// rotate image first
$_image->correctImageOrientation($image);
try {
$_image->correctImageOrientation($image);
} catch (\UnexpectedValueException $e) {
print "Message:<br>" . $e->getMessage() . "<br>" . $e . "<br>";
} catch (\RuntimeException $e) {
print "Message:<br>" . $e->getMessage() . "<br>" . $e . "<br>";
}
// thumbnail tests
echo "<div>CLASS->CREATETHUMBNAILSIMPLE: "
. basename($image) . ": WIDTH: $thumb_width<br><img src="
@@ -54,7 +60,13 @@ echo "<div>CLASS->CREATETHUMBNAILSIMPLE: "
// static
$image = BASE . LAYOUT . CONTENT_PATH . IMAGES . 'no_picture.jpg';
// rotate image first
$image_class::correctImageOrientation($image);
try {
$image_class::correctImageOrientation($image);
} catch (\UnexpectedValueException $e) {
print "Message:<br>" . $e->getMessage() . "<br>" . $e . "<br>";
} catch (\RuntimeException $e) {
print "Message:<br>" . $e->getMessage() . "<br>" . $e . "<br>";
}
// thumbnail tests
echo "<div>S::CREATETHUMBNAILSIMPLE: "
. basename($image) . ": WIDTH: $thumb_width<br><img src="
@@ -87,7 +99,13 @@ foreach ($images as $image) {
echo "<div><b>IMAGE INFO</b>: " . $height . "x" . $width . ", TYPE: "
. \CoreLibs\Debug\Support::dumpVar($img_type) . " [" . $finfo->file($image) . "]</div>";
// rotate image first
Image::correctImageOrientation($image);
try {
Image::correctImageOrientation($image);
} catch (\UnexpectedValueException $e) {
print "Message:<br>" . $e->getMessage() . "<br>" . $e . "<br>";
} catch (\RuntimeException $e) {
print "Message:<br>" . $e->getMessage() . "<br>" . $e . "<br>";
}
// thumbnail tests
echo "<div>" . basename($image) . ": WIDTH: $thumb_width<br><img src="
. Image::createThumbnailSimple($image, $thumb_width, 0, $cache_folder, $web_folder) . "></div>";