diff --git a/html/home.php b/html/home.php
deleted file mode 100644
index d566554..0000000
--- a/html/home.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
- Home
-
-
- This is the homepage
-
-
\ No newline at end of file
diff --git a/routes/index.php b/routes/index.php
deleted file mode 100644
index 85719e3..0000000
--- a/routes/index.php
+++ /dev/null
@@ -1,52 +0,0 @@
-set404(function () {
- header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
- echo '404, route not found!';
- });
-
- $leaf->get('/', function() use($response) {
- $res = [
- 'message' => 'Welcome to the Leaf PHP starter...you can find a simple demo in `routes/index.php`',
- 'first steps' => array(
- 'One' => 'Define what you want to use Leaf Starter for (setting up an API or server side rendering is especially easy with Leaf)',
- 'Two' => 'Read the documentation, every piece of functionality you need has been explained over there'
- )
- ];
- echo $response->respond($res);
- });
-
- $leaf->get('/home', function() use($response) {
- // there's no need to return the html page since it will display immedietly it loads
- $response->renderHtmlPage('html/home.php');
- });
-
- $leaf->get('/hello', function () {
- echo 'bramus/router
Visit /hello/name
to get your Hello World mojo on!
';
- });
-
- $leaf->get('/user/{id}', function ($id) {
- echo $id;
- });
-
- // database example (to use, first define your database connection variables in init.php)
- // $leaf->get('/books/all', function() use($connection, $response) {
- // $books = mysqli_fetch_all(mysqli_query($connection, "SELECT * FROM books"));
- // echo $response->respond($books);
- // });
-
- $leaf->get('/date-tests', function() use($response, $date) {
- // some date methods
- $timestamp = $date->timestamp();
- $dates = array();
- $dates['GetDateFromTimeStamp'] = $date->GetDateFromTimeStamp($timestamp);
- $dates['GetEnglishDateFromTimeStamp'] = $date->GetEnglishDateFromTimeStamp($timestamp);
- $dates['GetEnglishTimeStampFromTimeStamp'] = $date->GetEnglishTimeStampFromTimeStamp($timestamp);
- $dates['GetTimeFromTimeStamp'] = $date->GetTimeFromTimeStamp($timestamp);
- echo $response->respond($dates);
- });
-
- $leaf->get('/token/create', function() use($authentication, $response) {
- $token = $authentication->generateSimpleToken(1, "SECRET KEY");
- echo $response->respond(["token" => $token]);
- });
diff --git a/src/config/init.php b/src/config/init.php
deleted file mode 100644
index bd26360..0000000
--- a/src/config/init.php
+++ /dev/null
@@ -1,22 +0,0 @@
-connectMysqli($host, $user, $password, $dbname);
-
- $leaf = new \Leaf\Core\Router();
-
- $response = new \Leaf\Core\Response();
-
- $request = new \Leaf\Core\Request();
-
- $validate = new \Leaf\Core\Validation($response);
-
- $date = new \Leaf\Core\CustomDate();
-
- $jwt = new \Leaf\Helpers\JWT();
-
- $authentication = new \Leaf\Core\Authentication();
diff --git a/src/core/auth.php b/src/core/authentication.php
similarity index 100%
rename from src/core/auth.php
rename to src/core/authentication.php
diff --git a/src/core/date.php b/src/core/customdate.php
similarity index 100%
rename from src/core/date.php
rename to src/core/customdate.php
diff --git a/src/core/router.php b/src/core/leaf.php
similarity index 99%
rename from src/core/router.php
rename to src/core/leaf.php
index cc5ad4a..dbe0c55 100644
--- a/src/core/router.php
+++ b/src/core/leaf.php
@@ -4,7 +4,7 @@
*/
namespace Leaf\Core;
- class Router
+ class Leaf
{
/**
* @var array The route patterns and their handling functions
diff --git a/src/core/respond.php b/src/core/response.php
similarity index 100%
rename from src/core/respond.php
rename to src/core/response.php
diff --git a/src/core/fieldValidate.php b/src/core/validation.php
similarity index 100%
rename from src/core/fieldValidate.php
rename to src/core/validation.php