PHPackages                             jaeger-app/bootstrap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jaeger-app/bootstrap

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

jaeger-app/bootstrap
====================

A pre-configured dependency injection container and start-up initialization object.

0.1.2(9y ago)0341MITPHPPHP &gt;=5.4.0

Since Apr 21Pushed 9y ago1 watchersCompare

[ Source](https://github.com/jaeger-app/bootstrap)[ Packagist](https://packagist.org/packages/jaeger-app/bootstrap)[ RSS](/packages/jaeger-app-bootstrap/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (16)Versions (4)Used By (1)

Jaeger Bootstrap Object
=======================

[](#jaeger-bootstrap-object)

[![Build Status](https://camo.githubusercontent.com/1566d5e09c12138e86af4984d2c3c50772e917770fd50bc9653d7a5dab3c09c7/68747470733a2f2f7472617669732d63692e6f72672f6a61656765722d6170702f626f6f7473747261702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jaeger-app/bootstrap)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/67aea2cbebb6b88ef733c880c9d85289d6ce3d617644e601173e3f57ad250a9a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a61656765722d6170702f626f6f7473747261702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/jaeger-app/bootstrap/?branch=master)[![Author](https://camo.githubusercontent.com/125fbdac4bce1d0b560eb4a34b10e11849db5b79150219c1118cac66a4630297/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d406d697468726136322d626c75652e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/mithra62)[![GitHub license](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://raw.githubusercontent.com/jaeger-app/bootstrap/master/LICENSE)

A pre-configured dependency injection container and start-up initialization object. Jaeger Bootstrap will prepare the most common Jaeger objects and make them ready for use as well as function as a stand alone dependency injection container utilizing [Pimple\\Container](https://packagist.org/packages/pimple/pimple).

Installation
------------

[](#installation)

Add `jaeger-app/bootstrap` as a requirement to your `composer.json`:

```
$ composer require jaeger-app/bootstrap
```

Simple Example
--------------

[](#simple-example)

```
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');
```

Configured Services
-------------------

[](#configured-services)

`Jaeger\Bootstrap` sets up quite a few Jaeger objects and makes them ready for use.

```
use \JaegerApp\Bootstrap;
$bootstrap = new Bootstrap();
$db = $bootstrap->getService('db');
$email = $bootstrap->getService('email');
$encrypt = $bootstrap->getService('encrypt');
$lang = $bootstrap->getService('lang');
$validate = $bootstrap->getService('validate');
$files = $bootstrap->getService('files');
$view = $bootstrap->getService('view');
$shell = $bootstrap->getService('shell');
$console = $bootstrap->getService('console');
```

Adding Services
---------------

[](#adding-services)

Ideally, like all Jaeger classes, you should extend `Jaeger\Bootstrap` and initialize the parent services before adding your own like the below:

```
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;
    }
}
```

You can also add new Services at run time by using the `setService($name, \Closure $function)` method.

```
use \JaegerApp\Bootstrap;

$bootstrap = new Bootstrap();
$callable = function() {
    return 'foo to the who';
};

$bootstrap->setService('test_service', $callable);
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~38 days

Total

3

Last Release

3648d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/042722642fab9b3e2f7b0711428b40053a2be0d6a1b752e50e7a7fffd06fb712?d=identicon)[mithra62](/maintainers/mithra62)

---

Top Contributors

[![eric-lamb62](https://avatars.githubusercontent.com/u/1008036?v=4)](https://github.com/eric-lamb62 "eric-lamb62 (31 commits)")

---

Tags

dependency-injectiondi

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jaeger-app-bootstrap/health.svg)

```
[![Health](https://phpackages.com/badges/jaeger-app-bootstrap/health.svg)](https://phpackages.com/packages/jaeger-app-bootstrap)
```

###  Alternatives

[level-2/dice

A minimalist Dependency injection container (DIC) for PHP. Please note: 3.0+ is only compatible with PHP 7.0. The 2.0 branch is compatbile with PHP 5.6.

436797.2k21](/packages/level-2-dice)[x-wp/di

The dependency injection container for WordPress

314.2k13](/packages/x-wp-di)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
