Skip to content

Commit f560918

Browse files
authored
Merge pull request #2 from darmen/master
Update readme.md
2 parents cc801b8 + 9f4bcb6 commit f560918

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

readme.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
## SOLID Principles Examples in PHP
22

3-
### Single Responsibility Principle
4-
A class should have one, and only one, reason to change. [Example](./1-single-responsibility-principle.php)
3+
### Single Responsibility Principle ([Example](./1-single-responsibility-principle.php))
4+
This principle is about **actors and high level architecture**.
5+
> A class should have one, and only one, reason to change.
56
6-
### Open Closed Principle
7-
A class should be open for extension, but closed for modification. [Example](./2-open-closed-principle.php)
7+
### Open Closed Principle ([Example](./2-open-closed-principle.php))
8+
This principle is about **class design and feature extensions**.
9+
> A class should be open for extension, but closed for modification.
810
9-
### Liskov Substitution Principle
10-
Derived classes must be substitutable for their base classes. [Example](./3-liskov-substitution-principle.php)
11+
### Liskov Substitution Principle ([Example](./3-liskov-substitution-principle.php))
12+
This principle is about **subtyping and inheritance**
13+
> Derived classes must be substitutable for their base classes.
1114
12-
### Interface Segregation Principle
13-
Many client-specific interfaces are better than one general-purpose interface. [Example](./4-interface-segregation-principle.php)
15+
### Interface Segregation Principle ([Example](./4-interface-segregation-principle.php))
16+
This principle is about **business logic to clients communication**.
17+
> Many client-specific interfaces are better than one general-purpose interface.
1418
15-
### Dependency Inversion Principle
16-
Depend upon abstractions. Do not depend upon concretions. [Example](./5-dependency-inversion-principle.php)
19+
### Dependency Inversion Principle ([Example](./5-dependency-inversion-principle.php))
20+
> This principle wires up all **other four principles in a single circle**.
21+
Depend upon abstractions. Do not depend upon concretions.
1722

1823
#### For more information about *Object Oriented Design Principles*, you can refer [this slide](https://viblo.asia/thangtd90/posts/pVYRPJPmG4ng)

0 commit comments

Comments
 (0)