Skip to content

Instantly share code, notes, and snippets.

@eljam
Created February 19, 2019 17:38
Show Gist options
  • Save eljam/375450ca20768e0f3fc78b3df6d7440c to your computer and use it in GitHub Desktop.
Save eljam/375450ca20768e0f3fc78b3df6d7440c to your computer and use it in GitHub Desktop.
CQRS Structure
src
├── Application
│   ├── Command
│   │   ├── CommandHandlerInterface.php
│   │   ├── CreateFlightTripItem
│   │   │   ├── CreateFlightTripItemCommand.php
│   │   │   └── CreateFlightTripItemHandler.php
│   │   ├── CreateRoomTripItem
│   │   │   ├── CreateRoomTripItemCommand.php
│   │   │   └── CreateRoomTripItemHandler.php
│   │   └── CreateTrip
│   │       ├── CreateTripCommand.php
│   │       └── CreateTripHandler.php
│   └── Query
│       ├── GetRoomTripItem
│       │   ├── GetRoomTripItemHandler.php
│       │   └── GetRoomTripItemQuery.php
│       ├── GetRoomTripItems
│       │   ├── GetRoomTripItemsHandler.php
│       │   └── GetRoomTripItemsQuery.php
│       ├── GetTrip
│       │   ├── GetTripHandler.php
│       │   └── GetTripQuery.php
│       ├── GetTrips
│       │   ├── GetTripsHandler.php
│       │   └── GetTripsQuery.php
│       ├── Projection
│       │   ├── RoomTripItemView.php
│       │   └── TripView.php
│       └── QueryHandlerInterface.php
├── Domain
│   ├── Event
│   │   ├── DomainEventInterface.php
│   │   ├── FlightTripItemWasCreatedEvent.php
│   │   ├── RoomTripItemWasCreatedEvent.php
│   │   └── TripWasCreatedEvent.php
│   ├── Exception
│   │   ├── Command
│   │   │   ├── AccommodationNotFoundException.php
│   │   │   └── TripNotFoundException.php
│   │   └── Query
│   │       ├── RoomTripItemNotFoundException.php
│   │       └── TripNotFoundException.php
│   ├── Model
│   │   ├── Accommodation.php
│   │   ├── AccommodationType.php
│   │   ├── FlightTripItem.php
│   │   ├── IdentifierTrait.php
│   │   ├── RoomTripItem.php
│   │   ├── TimeTrait.php
│   │   ├── Trip.php
│   │   └── TripItem.php
│   ├── Repository
│   │   ├── AccommodationRepositoryInterface.php
│   │   ├── FlightTripItemRepositoryInterface.php
│   │   ├── RoomTripItemRepositoryInterface.php
│   │   └── TripRepositoryInterface.php
│   └── Shared
│       ├── Command
│       │   └── NotFoundException.php
│       ├── DomainExceptionInterface.php
│       └── Query
│           └── NotFoundException.php
├── Infrastructure
│   ├── Command
│   │   ├── CreateRoomTripItemCommand.php
│   │   ├── CreateTripCommand.php
│   │   └── DoctrineExportMappingCommand.php
│   ├── DataProvider
│   │   └── ApiPlatform
│   │       ├── AbstractDataProvider.php
│   │       ├── DataProviderInterface.php
│   │       ├── RoomTripItem
│   │       └── Trip
│   ├── Doctrine
│   │   ├── DataFixtures
│   │   │   └── AppFixtures.php
│   │   ├── DoctrineExtensions
│   │   │   └── DBAL
│   │   └── Migrations
│   ├── EventListener
│   │   └── LogAfterTripWasCreatedListener.php
│   ├── Repository
│   │   ├── AccommodationRepository.php
│   │   ├── FlightTripItemRepository.php
│   │   ├── RoomTripItemRepository.php
│   │   └── TripRepository.php
│   └── config
│       ├── api_platform
│       │   ├── trip.xml
│       │   └── trip_items.xml
│       ├── doctrine
│       │   ├── Accommodation.orm.xml
│       │   ├── AccommodationType.orm.xml
│       │   ├── FlightTripItem.orm.xml
│       │   ├── RoomTripItem.orm.xml
│       │   ├── Trip.orm.xml
│       │   └── TripItem.orm.xml
│       ├── serializer
│       │   ├── create_room_trip_item_command.xml
│       │   └── create_trip_command.xml
│       └── validation
│           ├── create_room_trip_item_command.xml
│           └── create_trip_command.xml
├── Kernel.php
└── Presentation
    ├── Api
    │   └── Rest
    │       ├── Controller
    │       ├── Form
    │       └── Twig
    └── Web
        ├── Backoffice
        │   └── Controller
        └── Frontoffice
            ├── Controller
            └── Form
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment