summaryrefslogtreecommitdiff
path: root/src/Form.php
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2022-03-06 11:45:31 +0100
committerDaniel Weipert <code@drogueronin.de>2022-03-06 11:45:31 +0100
commit1334236bb6059b2302a760196ce7885df379e984 (patch)
treef86e883e6ae9510454307f38be3ffd20aefa6c4c /src/Form.php
parentad83d1dafac62bb28fda004f86129319a5c3e2ca (diff)
toml to yaml
Diffstat (limited to 'src/Form.php')
-rw-r--r--src/Form.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Form.php b/src/Form.php
new file mode 100644
index 0000000..62527aa
--- /dev/null
+++ b/src/Form.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace FlatFileForms;
+
+class Form
+{
+ public string $name;
+
+ public function __construct(
+ public string $path,
+ )
+ {
+ $this->name = basename($path);
+ }
+
+ public function getFields(mixed $page = null)
+ {
+ $builder = new Builder($this->path);
+
+ return $builder->buildFields($page);
+ }
+}