1. Go to this page and download the library: Download simovative/zeus library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
simovative / zeus example snippets
protected function registerBundles(HttpRequestInterface $request) {
$bundles = array();
$bundles[] = new DemoApplicationBundle();
$bundles[] = new \Simovative\Demo\Test\TestBundle();
return $bundles;
}
/* public/index.php */
$basePath = __DIR__ . '/..';
g = parse_ini_file($basePath . '/config.ini');
} else {
$config = array();
}
$masterFactory = new Simovative\Zeus\Dependency\MasterFactory(
new \Simovative\Zeus\Configuration\Configuration($config, $basePath)
);
$kernel = new \Simovative\Skeleton\Application\SkeletonKernel($masterFactory);
$kernel->run($masterFactory->createRequestFromGlobals());
/* public/index.php */
$basePath = __DIR__ . '/..';
'redis_url'),
getenv('queue_url'),
);
$masterFactory = new Simovative\Zeus\Dependency\MasterFactory(
new \Simovative\Zeus\Configuration\Configuration($config, $basePath)
);
$kernel = new \Simovative\Skeleton\Application\SkeletonKernel($masterFactory);
$kernel->run($masterFactory->createRequestFromGlobals());
namespace Simovative\Skeleton\Application;
use Simovative\Zeus\Http\HttpKernel;
use Simovative\Zeus\Http\Request\HttpRequestInterface;
/**
* My Applications wonderful Kernel
*/
class Kernel extends HttpKernel {
/**
* @inheritdoc
*/
protected function registerBundles(HttpRequestInterface $request) {
return array(new ApplicationBundle());
}
/**
* @inheritdoc
*/
protected function getApplicationState() {
return $this->getMasterFactory()->createApplicationState();
}
}
protected function registerBundles(HttpRequestInterface $request) {
return array(
new ApplicationBundle(),
new LoginBundle(),
new OtherBundleThatNeedsLogin(),
);
}