/solid-principles

A very simple code explanation in PHP for SOLID principles

Primary LanguagePHP

SOLID Principles in PHP

This repository is dedicated to demonstrating the SOLID design principles using PHP.

Files

Each file in this repository corresponds to one SOLID principle:

  1. 0_single_responsibility.php: An example of the Single Responsibility Principle (SRP).
  2. 1_open_closed.php: Demonstrates the Open-Closed Principle (OCP).
  3. 2_liskov_sustitution.php: Shows a practical example of the Liskov Substitution Principle (LSP).
  4. 3_interface_segregation.php: An application of the Interface Segregation Principle (ISP).
  5. 4_dependency_inversion.php: A use case for the Dependency Inversion Principle (DIP).

Please direct your attention to each file for detailed explanations and code samples representing each principle.