3) Introducing ConfigFactory
This commit is contained in:
parent
5c50684b50
commit
4af0119b73
23 changed files with 843 additions and 632 deletions
11
index.php
11
index.php
|
@ -5,7 +5,9 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Util\LoggerFactory;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Factory;
|
||||
use Friendica\Util\BasePath;
|
||||
|
||||
if (!file_exists(__DIR__ . '/vendor/autoload.php')) {
|
||||
die('Vendor path not found. Please execute "bin/composer.phar --no-dev install" on the command line in the web root.');
|
||||
|
@ -13,10 +15,13 @@ if (!file_exists(__DIR__ . '/vendor/autoload.php')) {
|
|||
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
$logger = LoggerFactory::create('index');
|
||||
$basedir = BasePath::create(__DIR__);
|
||||
$configLoader = new Config\ConfigCacheLoader($basedir);
|
||||
$config = Factory\ConfigFactory::createCache($configLoader);
|
||||
$logger = Factory\LoggerFactory::create('index', $config);
|
||||
|
||||
// We assume that the index.php is called by a frontend process
|
||||
// The value is set to "true" by default in App
|
||||
$a = new App(__DIR__, $logger, false);
|
||||
$a = new App($config, $logger, false);
|
||||
|
||||
$a->runFrontend();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue