1. Go to this page and download the library: Download jaeger-app/bootstrap 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/ */
jaeger-app / bootstrap example snippets
use \JaegerApp\Bootstrap;
$bootstrap = new Bootstrap();
//get all the services
$services = $bootstrap->getServices();
//get a specific service
$db = $services['db'];
//or ger specific service directly
$db = $bootstrap->getService('db');
use \JaegerApp\Bootstrap;
class MyBootstrap extends Bootstrap
{
public function getServices()
{
$this->container = parent::getServices(); //init existing services
//add new service
$this->container['my_service'] = function ($c) {
$settings = new NewService;
return $settings;
};
return $this->container;
}
}
use \JaegerApp\Bootstrap;
$bootstrap = new Bootstrap();
$callable = function() {
return 'foo to the who';
};
$bootstrap->setService('test_service', $callable);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.