mirror of
https://github.com/xPaw/PHP-Source-Query.git
synced 2026-06-11 02:13:14 +02:00
Move the response array logic into classes.
This commit is contained in:
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace xPaw\SourceQuery;
|
||||
|
||||
use xPaw\SourceQuery\Rcon\GoldSourceRcon;
|
||||
use xPaw\SourceQuery\Rcon\SourceRcon;
|
||||
use xPaw\SourceQuery\Socket\GoldSourceSocket;
|
||||
use xPaw\SourceQuery\Socket\SourceSocket;
|
||||
|
||||
@@ -11,11 +13,17 @@ final class SourceQueryFactory
|
||||
{
|
||||
public static function createGoldSourceQuery(): SourceQuery
|
||||
{
|
||||
return new SourceQuery(new SourceSocket());
|
||||
$socket = new SourceSocket();
|
||||
$rcon = new SourceRcon($socket);
|
||||
|
||||
return new SourceQuery($socket, $rcon);
|
||||
}
|
||||
|
||||
public static function createSourceQuery(): SourceQuery
|
||||
{
|
||||
return new SourceQuery(new GoldSourceSocket());
|
||||
$socket = new GoldSourceSocket();
|
||||
$rcon = new GoldSourceRcon($socket);
|
||||
|
||||
return new SourceQuery($socket, $rcon);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user