aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2018-09-09 04:02:36 -0400
committerThedro Neely <thedroneely@gmail.com>2018-09-09 04:05:52 -0400
commit0c2ec5ea3330c4b8a01c0f2c05b1e54475dd94d9 (patch)
tree6b1b796ca9cc7620e003744ffd6be35858345ad7 /app
parent2bdcd9d9283b44e7c35822aa1317013928006fd8 (diff)
downloadthedroneely.com-0c2ec5ea3330c4b8a01c0f2c05b1e54475dd94d9.tar.gz
thedroneely.com-0c2ec5ea3330c4b8a01c0f2c05b1e54475dd94d9.tar.bz2
thedroneely.com-0c2ec5ea3330c4b8a01c0f2c05b1e54475dd94d9.zip
app/model: Refactor helper function into navigation class
Diffstat (limited to 'app')
-rw-r--r--app/Functions.php11
-rw-r--r--app/model/Navigation.php10
2 files changed, 10 insertions, 11 deletions
diff --git a/app/Functions.php b/app/Functions.php
deleted file mode 100644
index af05451..0000000
--- a/app/Functions.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-
-function generateTitle()
-{
- switch ($_SERVER['REQUEST_URI']) {
- case '/contact/':
- $uri = $_SERVER['REQUEST_URI'];
- echo $titleHeader = 'Contact - ';
- break;
- }
-}
diff --git a/app/model/Navigation.php b/app/model/Navigation.php
index 4db89b5..b10bf45 100644
--- a/app/model/Navigation.php
+++ b/app/model/Navigation.php
@@ -28,4 +28,14 @@ class Navigation
echo str_repeat("\t", 4) . "<a class=\"navbar-item$append\"" . ' href="' . $route['uri'] . '">' . $title . '</a>' . "\n";
}
}
+
+ public function generateTitle()
+ {
+ switch ($_SERVER['REQUEST_URI']) {
+ case '/contact/':
+ $uri = $_SERVER['REQUEST_URI'];
+ echo $titleHeader = 'Contact - ';
+ break;
+ }
+ }
}