summaryrefslogtreecommitdiff
path: root/src/Support
diff options
context:
space:
mode:
Diffstat (limited to 'src/Support')
-rw-r--r--src/Support/ConnectsToDatabase.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Support/ConnectsToDatabase.php b/src/Support/ConnectsToDatabase.php
new file mode 100644
index 0000000..29f566c
--- /dev/null
+++ b/src/Support/ConnectsToDatabase.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace App\Support;
+
+interface ConnectsToDatabase
+{
+ /**
+ * @param array<string,mixed> $row
+ */
+ public static function fromDatabase(array $row): self;
+
+ public static function fetch(): ?self;
+
+ /**
+ * @return array<self>
+ */
+ public static function fetchAll(): array;
+
+ public function insert(): bool;
+
+ public function update(): bool;
+
+ public function delete(): bool;
+}