Files
DesignPatternsPHP/Structural/Bridge/Service.php
2019-08-19 18:11:49 +02:00

30 lines
536 B
PHP

<?php declare(strict_types=1);
namespace DesignPatterns\Structural\Bridge;
abstract class Service
{
/**
* @var Formatter
*/
protected $implementation;
/**
* @param Formatter $printer
*/
public function __construct(Formatter $printer)
{
$this->implementation = $printer;
}
/**
* @param Formatter $printer
*/
public function setImplementation(Formatter $printer)
{
$this->implementation = $printer;
}
abstract public function get(): string;
}