1: <?php declare(strict_types=1);
2:
3: /**
4: * Clansuite Server Query
5: *
6: * SPDX-FileCopyrightText: 2003-2025 Jens A. Koch
7: * SPDX-License-Identifier: MIT
8: *
9: * For the full copyright and license information, please view
10: * the LICENSE file that was distributed with this source code.
11: */
12:
13: namespace Clansuite\ServerQuery\ServerProtocols;
14:
15: use function is_int;
16: use function is_string;
17: use Clansuite\Capture\Protocol\ProtocolInterface;
18: use Override;
19:
20: /**
21: * Homefront protocol implementation.
22: *
23: * Extends Steam protocol.
24: */
25: class Homefront extends Steam implements ProtocolInterface
26: {
27: /**
28: * Protocol name.
29: */
30: public string $name = 'Homefront';
31:
32: /**
33: * List of supported games.
34: *
35: * @var array<string>
36: */
37: public array $supportedGames = ['Homefront'];
38:
39: /**
40: * Protocol identifier.
41: */
42: public string $protocol = 'source';
43:
44: /**
45: * Constructor.
46: */
47: public function __construct(mixed $address = null, mixed $queryport = null)
48: {
49: $address = $address === null ? null : (is_string($address) ? $address : null);
50: $queryport = $queryport === null ? null : (is_int($queryport) ? $queryport : null);
51: parent::__construct($address, $queryport);
52: }
53:
54: /**
55: * getProtocolName method.
56: */
57: #[Override]
58: public function getProtocolName(): string
59: {
60: return $this->protocol;
61: }
62: }
63: