diff options
-rw-r--r-- | bootstrap/Bootstrap.php | 7 | ||||
-rw-r--r-- | bootstrap/Functions.php | 12 |
2 files changed, 17 insertions, 2 deletions
diff --git a/bootstrap/Bootstrap.php b/bootstrap/Bootstrap.php index 02d9395..8285bbe 100644 --- a/bootstrap/Bootstrap.php +++ b/bootstrap/Bootstrap.php @@ -1,10 +1,13 @@ <?php /* composer autoload */ -require $_SERVER['DOCUMENT_ROOT'] . '/..' . '/vendor/autoload.php';; +require $_SERVER['DOCUMENT_ROOT'] . '/..' . '/vendor/autoload.php'; + +/* source functions */ +require $_SERVER['DOCUMENT_ROOT'] . '/..' . '/bootstrap/Functions.php'; /* source config file */ -$config = include $_SERVER['DOCUMENT_ROOT'] . '/..' . '/AppConfig.php';; +$config = include $_SERVER['DOCUMENT_ROOT'] . '/..' . '/AppConfig.php'; /* connect database */ $contact['database'] = new QueryBuilder(Connection::make($config['database'])); diff --git a/bootstrap/Functions.php b/bootstrap/Functions.php new file mode 100644 index 0000000..52ec992 --- /dev/null +++ b/bootstrap/Functions.php @@ -0,0 +1,12 @@ +<?php + +/** + * Helper Functions + */ + +function featherIcon($name) { + echo file_get_contents( + $_SERVER['DOCUMENT_ROOT'] + . '/..' . '/public/css/fonts/feather-icons/' . $name . '.svg' + ); +} |