1
0
mirror of https://github.com/xPaw/PHP-Source-Query.git synced 2026-06-11 00:23:15 +02:00

Create a factory for easy setup.

Update README.md.
This commit is contained in:
Anthony Birkett
2021-05-31 14:53:28 +01:00
parent ca9edb41c3
commit 780ebba6a2
6 changed files with 49 additions and 27 deletions
+3 -4
View File
@@ -2,16 +2,15 @@
declare(strict_types=1);
require __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../vendor/autoload.php';
use xPaw\SourceQuery\Socket\SourceSocket;
use xPaw\SourceQuery\SourceQuery;
use xPaw\SourceQuery\SourceQueryFactory;
// For the sake of this example
header('Content-Type: text/plain');
header('X-Content-Type-Options: nosniff');
$query = new SourceQuery(new SourceSocket());
$query = SourceQueryFactory::createSourceQuery();
try {
$query->connect('localhost', 27015, 1);