We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2add463 commit 753936bCopy full SHA for 753936b
src/PHPJasper.php
@@ -210,6 +210,22 @@ protected function validateFormat($format)
210
}
211
212
213
+ /**
214
+ * @param string $input
215
+ * @return mixed
216
+ * @throws Exception\InvalidInputFile
217
+ */
218
+ public function listFields(string $input)
219
+ {
220
+ if (!is_file($input)) {
221
+ throw new Exception\InvalidInputFile();
222
+ }
223
+
224
+ preg_match_all("/<field name=\"(.*?)\"/s", file_get_contents($input), $matches);
225
226
+ return $matches[1] ?? [];
227
228
229
/**
230
* @param string $input
231
* @return $this
0 commit comments