File tree Expand file tree Collapse file tree 4 files changed +31
-3
lines changed Expand file tree Collapse file tree 4 files changed +31
-3
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ declare (strict_types=1 );
3
+
4
+ /**
5
+ * @author Pavel Djundik
6
+ *
7
+ * @link https://xpaw.me
8
+ * @link https://github.com/xPaw/PHP-Source-Query
9
+ *
10
+ * @license GNU Lesser General Public License, version 2.1
11
+ *
12
+ * @internal
13
+ */
14
+
15
+ namespace xPaw \SourceQuery ;
16
+
17
+ /**
18
+ * Base RCON interface
19
+ */
20
+ abstract class BaseRcon
21
+ {
22
+ abstract public function Close ( ) : void ;
23
+ abstract public function Open ( ) : void ;
24
+ abstract public function Write ( int $ Header , string $ String = '' ) : bool ;
25
+ abstract public function Read ( ) : Buffer ;
26
+ abstract public function Command ( string $ Command ) : string ;
27
+ abstract public function Authorize ( string $ Password ) : void ;
28
+ }
Original file line number Diff line number Diff line change 21
21
/**
22
22
* Class GoldSourceRcon
23
23
*/
24
- class GoldSourceRcon
24
+ class GoldSourceRcon extends BaseRcon
25
25
{
26
26
/**
27
27
* Points to socket class
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ class SourceQuery
66
66
/**
67
67
* Points to rcon class
68
68
*/
69
- private SourceRcon | GoldSourceRcon | null $ Rcon = null ;
69
+ private ? BaseRcon $ Rcon = null ;
70
70
71
71
/**
72
72
* Points to socket class
Original file line number Diff line number Diff line change 21
21
/**
22
22
* Class SourceRcon
23
23
*/
24
- class SourceRcon
24
+ class SourceRcon extends BaseRcon
25
25
{
26
26
/**
27
27
* Points to socket class
You can’t perform that action at this time.
0 commit comments