MAPG-86 add RouteCollection to global Container
This commit is contained in:
parent
6835db5e1f
commit
b0b244712f
2
main.php
2
main.php
@ -18,8 +18,10 @@ if (!empty($_ENV['DEV'])) {
|
|||||||
class Container
|
class Container
|
||||||
{
|
{
|
||||||
static MapGuesser\Interfaces\Database\IConnection $dbConnection;
|
static MapGuesser\Interfaces\Database\IConnection $dbConnection;
|
||||||
|
static MapGuesser\Routing\RouteCollection $routeCollection;
|
||||||
}
|
}
|
||||||
|
|
||||||
Container::$dbConnection = new MapGuesser\Database\Mysql\Connection($_ENV['DB_HOST'], $_ENV['DB_USER'], $_ENV['DB_PASSWORD'], $_ENV['DB_NAME']);
|
Container::$dbConnection = new MapGuesser\Database\Mysql\Connection($_ENV['DB_HOST'], $_ENV['DB_USER'], $_ENV['DB_PASSWORD'], $_ENV['DB_NAME']);
|
||||||
|
Container::$routeCollection = new MapGuesser\Routing\RouteCollection();
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
Loading…
Reference in New Issue
Block a user