コード例 #1
0
 /**
  */
 public static function getDefaultMainTitle()
 {
     return Container::getInstance()->config->getConfig('config')->get('titles')['mainTitle'];
 }
コード例 #2
0
<?php

getenv('ENVIRONMENT') || putenv('ENVIRONMENT=prod');
getenv('SIMPLEENGINE_DEBUG') && putenv('SIMPLEENGINE_DEBUG=true');
getenv('SIMPLEENGINE_REWRITE_URL') && putenv('SIMPLEENGINE_REWRITE_URL=true');
define('ENVIRONMENT', getenv('ENVIRONMENT'));
define('SIMPLEENGINE_DEBUG', 'true' == getenv('SIMPLEENGINE_DEBUG') ? true : false);
define('SIMPLEENGINE_REWRITE_URL', 'true' == getenv('SIMPLEENGINE_REWRITE_URL') ? true : false);
$composerClassLoader = (include_once dirname(__DIR__) . '/vendor/autoload.php');
use Ncr7\SimpleEngine\Engine\App\Container;
use Ncr7\SimpleEngine\Engine\App\Loader;
use Ncr7\SimpleEngine\Engine\Dispatcher\Dispatcher;
$container = Container::getInstance();
$container->loader = new Loader();
$container->loader->setComposerClassLoader($composerClassLoader);
$container->loader->initConfigToContainer(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'app');
$container->dispatcher = new Dispatcher();
$container->dispatcher->preDispatch();
$container->dispatcher->dispatch();
$container->dispatcher->postDispatch();