mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-06-28 04:03:02 +02:00
21 lines
410 B
PHP
21 lines
410 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace DesignPatterns\Structural\Bridge;
|
|
|
|
abstract class Service
|
|
{
|
|
protected Formatter $implementation;
|
|
|
|
public function __construct(Formatter $printer)
|
|
{
|
|
$this->implementation = $printer;
|
|
}
|
|
|
|
public function setImplementation(Formatter $printer)
|
|
{
|
|
$this->implementation = $printer;
|
|
}
|
|
|
|
abstract public function get(): string;
|
|
}
|