Phase 4 complete: - AuthorsRepository: simpleList, authorDetails, authorSave, authorDelete, authorByLang - NewsletterRepository: 14 methods — subscriber lifecycle, templates, sending - 4 legacy factories converted to thin wrappers - Globals ($settings, $lang) passed as explicit params to repo methods Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
36 lines
899 B
PHP
36 lines
899 B
PHP
<?php
|
|
namespace admin\factory;
|
|
class Authors
|
|
{
|
|
// prosta lista autorów
|
|
static public function get_simple_list()
|
|
{
|
|
global $mdb;
|
|
$repo = new \Domain\Authors\AuthorsRepository($mdb);
|
|
return $repo->simpleList();
|
|
}
|
|
|
|
// usunięcie autora
|
|
static public function delete_author( $id_author )
|
|
{
|
|
global $mdb;
|
|
$repo = new \Domain\Authors\AuthorsRepository($mdb);
|
|
return $repo->authorDelete($id_author);
|
|
}
|
|
|
|
// zapis autora
|
|
static public function save_author( $id_author, $author, $image, $description )
|
|
{
|
|
global $mdb;
|
|
$repo = new \Domain\Authors\AuthorsRepository($mdb);
|
|
return $repo->authorSave($id_author, $author, $image, $description);
|
|
}
|
|
|
|
// szczególy autora
|
|
static public function get_single_author( $id_author )
|
|
{
|
|
global $mdb;
|
|
$repo = new \Domain\Authors\AuthorsRepository($mdb);
|
|
return $repo->authorDetails($id_author);
|
|
}
|
|
} |