Skip to content

Commit c806d7a

Browse files
committed
Expose PersistentState
1 parent b5f59a2 commit c806d7a

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/PersistentState.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
class PersistentState {
88
private \PDO $pdo;
99

10-
1110
public function __construct(
1211
private string $civToken,
1312
private array $verifyList = [],
@@ -243,6 +242,11 @@ public static function writeJson(string $file, $data): void
243242
file_put_contents($file, json_encode($data, JSON_PRETTY_PRINT));
244243
}
245244

245+
/**
246+
* Retrieves the JSON path associated with the persistent state.
247+
*
248+
* @return string The file path to the JSON data.
249+
*/
246250
public function getJsonPath(): string
247251
{
248252
return $this->json_path;

src/Server.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,16 @@ public function getServer()
129129
return $this->server ?? null;
130130
}
131131

132+
/**
133+
* Retrieves the current state of the server.
134+
*
135+
* @return PersistentState The current state of the server.
136+
*/
137+
public function getState(): PersistentState
138+
{
139+
return $this->state;
140+
}
141+
132142
/**
133143
* Set the verbosity level of the server.
134144
*

0 commit comments

Comments
 (0)