ver. 0.287: Scontainers + ShopAttribute frontend migration to Domain

- Scontainers: frontScontainerDetails() with Redis cache in ScontainersRepository
- Scontainers: new front\Views\Scontainers VIEW, deleted factory + view legacy
- ShopAttribute: frontAttributeDetails(), frontValueDetails() with Redis cache in AttributeRepository
- ShopAttribute: clearFrontCache() per attribute/value + language
- ShopAttribute: deleted front\factory\ShopAttribute, updated 4 callers
- Tests: 476 OK, 1512 assertions (+6 frontend tests)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-17 08:47:21 +01:00
parent 8162df7356
commit 3b50ba7990
22 changed files with 314 additions and 125 deletions

View File

@@ -49,9 +49,10 @@
if ($row)
{
$row = explode('-', $row);
$attribute = \front\factory\ShopAttribute::attribute_details($row[0], $this->lang_id);
$attributeRepo = new \Domain\Attribute\AttributeRepository($GLOBALS['mdb']);
$attribute = $attributeRepo->frontAttributeDetails((int)$row[0], $this->lang_id);
echo '<div>' . $attribute['language']['name'] . ':</div>';
$value = \front\factory\ShopAttribute::value_details($row[1], $this->lang_id);
$value = $attributeRepo->frontValueDetails((int)$row[1], $this->lang_id);
echo '<div>' . $value['language']['name'] . '</div>';
}
?>

View File

@@ -30,9 +30,10 @@
if ($row)
{
$row = explode('-', $row);
$attribute = \front\factory\ShopAttribute::attribute_details($row[0], $this->lang_id);
$attributeRepo = new \Domain\Attribute\AttributeRepository($GLOBALS['mdb']);
$attribute = $attributeRepo->frontAttributeDetails((int)$row[0], $this->lang_id);
echo '<div>' . $attribute['language']['name'] . ':</div>';
$value = \front\factory\ShopAttribute::value_details($row[1], $this->lang_id);
$value = $attributeRepo->frontValueDetails((int)$row[1], $this->lang_id);
echo '<div>' . $value['language']['name'] . '</div>';
}
?>

View File

@@ -1,6 +1,7 @@
<?php
global $lang_id;
$attribute_details = \front\factory\ShopAttribute::attribute_details( $this -> attribute['id'], $lang_id );
$attributeRepo = new \Domain\Attribute\AttributeRepository( $GLOBALS['mdb'] );
$attribute_details = $attributeRepo->frontAttributeDetails( (int)$this -> attribute['id'], $lang_id );
if ( $attribute_details['type'] == 0 )
{
?>