mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-05-05 22:15:56 +02:00
22 lines
384 B
PHP
22 lines
384 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace DesignPatterns\Creational\Prototype;
|
|
|
|
abstract class BookPrototype
|
|
{
|
|
protected string $title;
|
|
protected string $category;
|
|
|
|
abstract public function __clone();
|
|
|
|
public function getTitle(): string
|
|
{
|
|
return $this->title;
|
|
}
|
|
|
|
public function setTitle(string $title)
|
|
{
|
|
$this->title = $title;
|
|
}
|
|
}
|