feat(05-domain-seoadditional-cron-releases): Domain layer kompletny — SeoAdditional + Cron + Releases

Phase 5 complete:
- Domain\SeoAdditional\SeoAdditionalRepository (elementDelete, elementSave, elementDetails)
- Domain\Cron\CronRepository (3 pub + 12 private helper methods)
- Domain\Releases\ReleasesRepository (9 metod: wersje, licencje, discover)
- Domain\Releases\UpdateRepository (auto-update, konstruktor($db, $settings))
- 4 legacy factory wrappers zaktualizowane do wrapper delegation

Domain layer: 13/13 repozytoriów kompletnych.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 00:57:13 +02:00
parent bf4b7c6429
commit f7c7c0bb88
14 changed files with 1292 additions and 755 deletions

View File

@@ -5,51 +5,21 @@ class SeoAdditional
public static function element_delete( $element_id )
{
global $mdb;
return $mdb -> delete( 'pp_seo_additional', [ 'id' => (int)$element_id ] );
$repo = new \Domain\SeoAdditional\SeoAdditionalRepository($mdb);
return $repo->elementDelete($element_id);
}
public static function element_save( $id, $url, $status, $title, $keywords, $description, $text )
{
global $mdb;
if ( !$id )
{
if ( $mdb -> insert( 'pp_seo_additional', [
'url' => $url,
'status' => $status == 'on' ? 1 : 0,
'title' => $title,
'keywords' => $keywords,
'description' => $description,
'text' => $text
] ) )
{
\S::delete_cache();
return $mdb -> id();
}
}
else
{
$mdb -> update( 'pp_seo_additional', [
'url' => $url,
'status' => $status == 'on' ? 1 : 0,
'title' => $title,
'keywords' => $keywords,
'description' => $description,
'text' => $text
$repo = new \Domain\SeoAdditional\SeoAdditionalRepository($mdb);
return $repo->elementSave($id, $url, $status, $title, $keywords, $description, $text);
}
], [
'id' => (int)$id
] );
\S::delete_cache();
return $id;
}
}
public static function element_details( $element_id )
{
global $mdb;
$result = $mdb -> get ( 'pp_seo_additional', '*', [ 'id' => (int)$element_id ] );
return $result;
global $mdb;
$repo = new \Domain\SeoAdditional\SeoAdditionalRepository($mdb);
return $repo->elementDetails($element_id);
}
}