Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
2 files changed, 10 insertions, 0 deletions
-rw-r--r--src/index.php3
-rw-r--r--src/models/JobOffer.php7
diff --git a/src/index.php b/src/index.php
index 285f6e7..6f290d6 100644
--- a/src/index.php
+++ b/src/index.php
@@ -3,4 +3,7 @@
include_once("models/JobOffer.php");
$jb = new JobOffer("a", "", "", 0);
+ foreach(JobOffer::getAll() as $key => $obj) {
+ echo $obj->salary . "<br>";
+ }
?>
diff --git a/src/models/JobOffer.php b/src/models/JobOffer.php
index 5cd6de4..736d644 100644
--- a/src/models/JobOffer.php
+++ b/src/models/JobOffer.php
@@ -18,4 +18,11 @@ class JobOffer extends DBModel {
self::$DB->createTable(self::TABLE_NAME, self::TABLE_COLUMNS);
}
+
+ /**
+ * @return JobOffer[]
+ */
+ static function getAll() {
+ return self::$DB->getAllValues(self::TABLE_NAME);
+ }
}