mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-05-12 17:35:37 +02:00
30 lines
548 B
PHP
30 lines
548 B
PHP
<?php
|
|
|
|
namespace DesignPatterns\Structural\Bridge;
|
|
|
|
abstract class Service
|
|
{
|
|
/**
|
|
* @var FormatterInterface
|
|
*/
|
|
protected $implementation;
|
|
|
|
/**
|
|
* @param FormatterInterface $printer
|
|
*/
|
|
public function __construct(FormatterInterface $printer)
|
|
{
|
|
$this->implementation = $printer;
|
|
}
|
|
|
|
/**
|
|
* @param FormatterInterface $printer
|
|
*/
|
|
public function setImplementation(FormatterInterface $printer)
|
|
{
|
|
$this->implementation = $printer;
|
|
}
|
|
|
|
abstract public function get();
|
|
}
|