Strategy Pattern

Use case: Create a log mechanism using a database or a file interchangeably

<?php

interface LoggerInterface
{
    public function log(string $message);
}

 

Concrete Implementations