api-erstellen #1
@@ -23,7 +23,6 @@ class WorkingHoursController
|
||||
{
|
||||
|
||||
protected PDO $databases;
|
||||
protected ContainerInterface $container;
|
||||
|
||||
|
TorstenHettstedt marked this conversation as resolved
|
||||
/**
|
||||
* WorkingHoursController constructor.
|
||||
@@ -34,11 +33,10 @@ class WorkingHoursController
|
||||
*/
|
||||
public function __construct(ContainerInterface $container)
|
||||
{
|
||||
$this->container = $container;
|
||||
if ($this->container->has('databases') === false) {
|
||||
if ($container->has('databases') === false) {
|
||||
throw new NotDatabasesException('Datenbank ist nicht Vorhanden');
|
||||
}
|
||||
$this->databases = $this->container->get('databases');
|
||||
$this->databases = $container->get('databases');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user
Der Container wird nur bei der Initialisierung benötigt.