aboutsummaryrefslogtreecommitdiff
path: root/app/Models
diff options
context:
space:
mode:
authorFrankie B <git@diskfloppy.me>2023-06-14 22:52:00 +0100
committerFrankie B <git@diskfloppy.me>2023-06-14 22:52:00 +0100
commit20e394e9f27aab0cb522f84f3d636b279ecb863e (patch)
tree12f2bc93f285bd58b036cae0b1d705fba2c40384 /app/Models
parent3a0306ac79f9cc836ba321f672f84ac66631a456 (diff)
Move classes to models folder
Diffstat (limited to 'app/Models')
-rw-r--r--app/Models/Bookmark.php29
-rw-r--r--app/Models/BookmarkCategory.php22
-rw-r--r--app/Models/Project.php36
-rw-r--r--app/Models/ProjectCategory.php22
4 files changed, 109 insertions, 0 deletions
diff --git a/app/Models/Bookmark.php b/app/Models/Bookmark.php
new file mode 100644
index 0000000..f679205
--- /dev/null
+++ b/app/Models/Bookmark.php
@@ -0,0 +1,29 @@
+<?php
+class Bookmark {
+ /**
+ * @var string The name of the bookmark.
+ */
+ public $name;
+
+ /**
+ * @var string The URL of the bookmark.
+ */
+ public $url;
+
+ /**
+ * @var string The description of the bookmark.
+ */
+ public $description;
+
+ /**
+ * Bookmark constructor.
+ * @param string $name The name of the bookmark.
+ * @param string $url The URL of the bookmark.
+ * @param string $description The description of the bookmark.
+ */
+ public function __construct($name, $url, $description) {
+ $this->name = $name;
+ $this->url = $url;
+ $this->description = $description;
+ }
+}
diff --git a/app/Models/BookmarkCategory.php b/app/Models/BookmarkCategory.php
new file mode 100644
index 0000000..0f2335d
--- /dev/null
+++ b/app/Models/BookmarkCategory.php
@@ -0,0 +1,22 @@
+<?php
+class BookmarkCategory {
+ /**
+ * @var string The name of the bookmark category.
+ */
+ public $name;
+
+ /**
+ * @var array An array of Bookmark objects.
+ */
+ public $bookmarks;
+
+ /**
+ * BookmarkCategory constructor.
+ * @param string $name The name of the bookmark category.
+ * @param array $bookmarks An array of Bookmark objects.
+ */
+ public function __construct($name, $bookmarks = array()) {
+ $this->name = $name;
+ $this->bookmarks = $bookmarks;
+ }
+}
diff --git a/app/Models/Project.php b/app/Models/Project.php
new file mode 100644
index 0000000..0b90828
--- /dev/null
+++ b/app/Models/Project.php
@@ -0,0 +1,36 @@
+<?php
+class Project {
+ /**
+ * @var string The name of the project.
+ */
+ public $name;
+
+ /**
+ * @var string The description of the project.
+ */
+ public $description;
+
+ /**
+ * @var string The URL of the project.
+ */
+ public $url;
+
+ /**
+ * @var array Languages used in the project.
+ */
+ public $languages;
+
+ /**
+ * BookmarkCategory constructor.
+ * @param string $name The name of the project.
+ * @param string $description The description of the project.
+ * @param string The URL of the project.
+ * @param array $languages Languages used in the project.s
+ */
+ public function __construct($name, $description, $url, $languages = array()) {
+ $this->name = $name;
+ $this->description = $description;
+ $this->url = $url;
+ $this->languages = $languages;
+ }
+}
diff --git a/app/Models/ProjectCategory.php b/app/Models/ProjectCategory.php
new file mode 100644
index 0000000..babe265
--- /dev/null
+++ b/app/Models/ProjectCategory.php
@@ -0,0 +1,22 @@
+<?php
+class ProjectCategory {
+ /**
+ * @var string The name of the bookmark category.
+ */
+ public $name;
+
+ /**
+ * @var array An array of Project objects.
+ */
+ public $projects;
+
+ /**
+ * BookmarkCategory constructor.
+ * @param string $name The name of the bookmark category.
+ * @param array $projects An array of Project objects.
+ */
+ public function __construct($name, $projects = array()) {
+ $this->name = $name;
+ $this->projects = $projects;
+ }
+}