summaryrefslogtreecommitdiff
path: root/src/Form.php
diff options
context:
space:
mode:
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);
+ }
+}