Skip to content

Commit bfcd98d

Browse files
committed
Update the documentation
1 parent 96fcb17 commit bfcd98d

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

README.md

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
11
# PHP-DI application kernel
22

3-
Kernel for applications built with [PHP-DI](http://php-di.org) and [Puli](http://puli.io) with built-in support for PHP-DI modules.
3+
Kernel for building modules with [PHP-DI](http://php-di.org) and [Composer-Locator](https://github.com/mindplay-dk/composer-locator).
44

55
[![Build Status](https://img.shields.io/travis/PHP-DI/Kernel.svg?style=flat-square)](https://travis-ci.org/PHP-DI/Kernel)
66
[![Coverage Status](https://img.shields.io/coveralls/PHP-DI/Kernel/master.svg?style=flat-square)](https://coveralls.io/r/PHP-DI/Kernel?branch=master)
77

88
## Introduction
99

10-
TODO
10+
The Kernel let's you build an application based on PHP-DI modules.
1111

1212
## Installation
1313

1414
```
1515
composer require php-di/kernel
1616
```
1717

18-
Requirements:
19-
20-
- PHP 7.0 or greater
21-
- [Puli CLI tool](http://docs.puli.io/en/latest/installation.html#installing-the-puli-cli)
22-
2318
## Usage
2419

2520
The kernel's role is to create the container. It does so by registering all the configuration files of the modules we ask it to load:
2621

2722
```php
2823
$kernel = new Kernel([
29-
'twig',
30-
'doctrine',
31-
'app',
24+
'twig/twig',
25+
'doctrine/dbal',
26+
'vendor/app',
3227
]);
3328

3429
$container = $kernel->createContainer();
@@ -55,15 +50,14 @@ To install a 3rd party module:
5550

5651
```php
5752
$kernel = new Kernel([
58-
'twig',
53+
'twig/twig',
5954
]);
6055
```
6156

6257
### Creating a module
6358

64-
1. choose a module name, usually `app` when writing an application, or anything else when writing a reusable module
59+
1. the Composer package name is the module name
6560
1. create a resource directory in your package, usually `res/`
66-
1. map it with Puli, for example `puli map /app res`
6761
1. create as many PHP-DI configuration files as needed in `res/config/`
6862

6963
That's it. Here is what your package should look like:
@@ -76,18 +70,17 @@ res/
7670
src/
7771
...
7872
composer.json
79-
puli.json
8073
```
8174
8275
When the module is registered in the kernel like this:
8376
8477
```php
8578
$kernel = new Kernel([
86-
'app',
79+
'foo/bar',
8780
]);
8881
```
8982

90-
all the files matching the Puli path `/blogpress/config/*.php` (i.e. `vendor/johndoe/blogpress/res/config/*.php` on the filesystem) will be loaded.
83+
all the files in `vendor/foo/bar/res/config/*.php` will be loaded.
9184

9285
### Environments
9386

0 commit comments

Comments
 (0)