Services in PHP
Services :
when there are operations that need to be represented, but Entities and Value Objects aren’t the best place, you should consider modeling these operations as Services. In Domain-Driven Design, there are typically three different types of Services you’ll encounter:
Application Services: Operate on scalar types, transforming them into Domain types. A scalar type can be considered any type that’s unknown to the Domain Model. This includes primitive types and types that don’t belong to the Domain.
Domain Services: Operate only on types belonging to the Domain. They contain meaningful concepts that can be found within the Ubiquitous Language. They hold operations that don’t fit well into Value Objects or Entities.
Infrastructure Services: Are operations that fulfill infrastructure concerns, such as sending emails and logging meaningful data. In terms of Hexagonal Architecture, they live outside the Domain boundary.
Application Services
Application Services are the middleware between the outside world and the Domain logic. The purpose of such a mechanism is to transform commands from the outside world into meaningful Domain instructions.
For More on services, visit