use Friendica\Federation\Entity\GServer as GServerEntity;
use Friendica\Federation\Factory\GServer as GServerFactory;
use Friendica\Network\HTTPException\NotFoundException;
-use Psr\Log\LoggerInterface;
final class GServer
{
- protected static $table_name = 'gserver';
+ private string $table_name = 'gserver';
- protected Database $db;
+ private Database $db;
- protected LoggerInterface $logger;
+ private GServerFactory $factory;
- protected GServerFactory $factory;
-
- public function __construct(Database $database, LoggerInterface $logger, GServerFactory $factory)
+ public function __construct(Database $database, GServerFactory $factory)
{
$this->db = $database;
- $this->logger = $logger;
$this->factory = $factory;
}
*/
public function selectOneById(int $gsid): GServerEntity
{
- $fields = $this->db->selectFirst(static::$table_name, [], ['id' => $gsid], []);
+ $fields = $this->db->selectFirst($this->table_name, [], ['id' => $gsid], []);
if (!$this->db->isResult($fields)) {
throw new NotFoundException();