I'm new to silex, and I've got a file that creates a few defines. This is its content:
<?php
namespace Config;
define('DS',DIRECTORY_SEPARATOR);
define('ROOT',realpath(__DIR__ . '/../..'));
define('CONFIG',ROOT.DS.'app'.DS.'config');
I'm trying to load it using my composer.json:
{
"require": {
"silex/silex": "~2.0",
"twig/twig": "^1.33",
"doctrine/dbal": "^2.5",
"symfony/twig-bridge": "^3.2",
"boxedcode/silex-knp-menu-service-provider": "^1.0",
"symfony/form": "^3.2",
"symfony/validator": "^3.2",
"symfony/config": "^3.2"
},
"autoload": {
"psr-4": {
"Models\\": "src/MyApp/Models/",
"Config\\": "src/MyApp/Config/"
}
}
}
The defines file is inside src/MyApp/Config/
, so I therefore hoped this line would be enough to load the defines file in my index.php file:
use Config\Defines;
But... it seems not... Can anyone tell me how to load the defines file so that I can use my Config class again?