Component structure
There are no restrictions on the folder structure of your component.
-
Pacemaker Community Edition components are installed with Composer
-
The component structure should be at least PSR-0 or better PSR-4 compatible
-
-
Each component comes with its own configuration e.g. , the necessary files for DI
-
The structure should also support separation of source code and configuration files
Example
- When implementing your first component, the recommended component structure looks like this:
Tree: Component structure
composer.json
├── src/
│ ├── Actions/
│ │ └── Processors/
│ ├── Assemblers
│ ├── Callbacks (1)
│ ├── Observers (2)
│ ├── Repositories
│ │ └── CacheWarmers/
│ ├── Services
│ ├── Subjects (3)
│ └── Utils
├── tests/
└── symfony/
│ ├── DependencyInjection/ (4)
│ ├── Resources/
│ │ └── config/
│ │ └── services.xml
│ └── Utils/
│ └── DependencyInjectionKeys.php
└── ImportBundle.php
1 | see Callbacks |
2 | see Observers |
3 | see Subjects |
4 | see Dependency injection |