Skip to content

s-damian/solid-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SOLID - Examples with PHP 8

Here there is an example of SOLID in PHP 8

Author

PHP Developer

SOLID

S : Single Responsibility Principle - A class must have one and only one responsibility.

O : Open Closed Principle - A class must be open to extension, but closed to modification.

L : Liskov Substitution Principle - An instance of type T must be able to be replaced by an instance of type G, such as G subtype of T, without this modifying the consistency of the program.

I : Interface Segregation Principle - Prefer several specific interfaces for each client rather than a single general interface.

D : Dependency Inversion Principle - Depend on abstractions, not implementations.

Examples