|
1 | 1 | Components
|
2 | 2 | ==========
|
3 | 3 |
|
4 |
| -PHP++ id a set of reusable components. You can use all of them of just the one you need. |
| 4 | +PHP++ est un ensemble de composants. |
5 | 5 |
|
6 |
| -Contracts components |
7 |
| --------------------- |
8 |
| - |
9 |
| -When it's possible, a component has it's counterpart ``-contract`` with only interfaces. |
10 |
| - |
11 |
| -If you don't need to use our implementation of this interfaces |
12 |
| -(you just need a typehint, you want to create your own implementation etc), |
13 |
| -use the ``-contract`` dependency and work with interfaces. |
14 |
| - |
15 |
| -Example: |
16 |
| - |
17 |
| -.. code-block:: php |
18 |
| - :emphasize-lines: 4 |
19 |
| -
|
20 |
| - <?php |
21 |
| - // If you need a StringCollection to work with it, |
22 |
| - // don't use StringCollection but StringCollectionInterface |
23 |
| - function foo(StringCollectionInterface $strings): void |
24 |
| - { |
25 |
| - // Do some stuff here with $strings |
26 |
| - } |
| 6 | +Vous pouvez utiliser chaque composant séparément, aucun composant n'est obligatoire : |
| 7 | +c'est à vous de décider d'installer ce dont vous avez besoin ! |
27 | 8 |
|
28 | 9 | Components
|
29 | 10 | ----------
|
30 | 11 |
|
31 |
| -+----------------------+--------------------------------------------+ |
32 |
| -| Component | Description | |
33 |
| -+======================+============================================+ |
34 |
| -| collection | Replace array by a strict typed collection | |
35 |
| -+----------------------+--------------------------------------------+ |
36 |
| -| collection-contracts | Contracts for collection | |
37 |
| -+----------------------+--------------------------------------------+ |
38 |
| -| collection-generator | Helps you to generate a Collection | |
39 |
| -+----------------------+--------------------------------------------+ |
| 12 | ++-------------------------------------------------+----------------------------------------------------------+ |
| 13 | +| Component | Description | |
| 14 | ++=================================================+==========================================================+ |
| 15 | +| `collection <component/collection/index.html>`_ | Modèle objet pour remlacer ``array`` par une liste typée | |
| 16 | ++-------------------------------------------------+----------------------------------------------------------+ |
40 | 17 |
|
41 | 18 | Development components
|
42 | 19 | ----------------------
|
|
0 commit comments