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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user