-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move initial router code from index.php to /src/bootstrap.php.
Issue MIDU-177
- Loading branch information
1 parent
008ab0a
commit e0fa0b9
Showing
3 changed files
with
24 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
<?php | ||
|
||
require 'vendor/autoload.php'; | ||
|
||
//require 'src/bootstrap.php'; | ||
|
||
use Logeecom\Bookstore\presentation\routers\BaseRouter; | ||
|
||
$request_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); | ||
(new BaseRouter())->route($request_path); | ||
require 'src/bootstrap.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
<?php | ||
|
||
use Logeecom\Bookstore\data_access\repositories\authors\AuthorRepositorySession; | ||
use Logeecom\Bookstore\data_access\repositories\books\BookRepositorySession; | ||
|
||
if (session_status() === PHP_SESSION_NONE) { | ||
session_start(); | ||
|
||
// if (!AuthorRepositorySession::dataInitialized()) { | ||
// AuthorRepositorySession::initializeData(); | ||
// } | ||
// if (!BookRepositorySession::dataInitialized()) { | ||
// BookRepositorySession::initializeData(); | ||
// } | ||
} | ||
require __DIR__ . '/../vendor/autoload.php'; | ||
|
||
//require 'session.php'; | ||
|
||
use Logeecom\Bookstore\presentation\routers\BaseRouter; | ||
|
||
$request_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); | ||
(new BaseRouter())->route($request_path); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
use Logeecom\Bookstore\data_access\repositories\authors\AuthorRepositorySession; | ||
use Logeecom\Bookstore\data_access\repositories\books\BookRepositorySession; | ||
|
||
if (session_status() === PHP_SESSION_NONE) { | ||
session_start(); | ||
|
||
if (!AuthorRepositorySession::dataInitialized()) { | ||
AuthorRepositorySession::initializeData(); | ||
} | ||
if (!BookRepositorySession::dataInitialized()) { | ||
BookRepositorySession::initializeData(); | ||
} | ||
} |