Skip to content

Commit 1e8db19

Browse files
committed
feat: Add DedicatedServer handler to Client class
Introduce a new DedicatedServer handler with a corresponding getter method in the Client class. This addition ensures support for managing DedicatedServer functionality consistently alongside other handlers.
1 parent 3b56fc4 commit 1e8db19

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Client.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace FireAPI;
44

55
use FireAPI\Accounting\Accounting;
6+
use FireAPI\DedicatedServer\DedicatedServer;
67
use FireAPI\Domain\Domain;
78
use FireAPI\Exceptions\ParameterException;
89
use FireAPI\RootServer\RootServer;
@@ -19,6 +20,7 @@ class Client
1920
private ?Accounting $accountingHandler = null;
2021
private ?Domain $domainHandler = null;
2122
private ?RootServer $rootServerHandler = null;
23+
private ?DedicatedServer $dedicatedServerHandler = null;
2224

2325
/**
2426
* Client constructor.
@@ -211,4 +213,14 @@ public function rootServer(): RootServer
211213
{
212214
return $this->rootServerHandler ??= new RootServer($this);
213215
}
216+
217+
/**
218+
* Gets the dedicated server instance, initializing it if not already created.
219+
*
220+
* @return DedicatedServer The dedicated server instance.
221+
*/
222+
public function dedicatedServer(): DedicatedServer
223+
{
224+
return $this->dedicatedServerHandler ??= new DedicatedServer($this);
225+
}
214226
}

0 commit comments

Comments
 (0)