mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-02-24 09:42:24 +01:00
42 lines
567 B
PHP
42 lines
567 B
PHP
<?php
|
|
|
|
namespace DesignPatterns\Creational\Prototype;
|
|
|
|
/**
|
|
* class BookPrototype
|
|
*/
|
|
abstract class BookPrototype
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $title;
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $category;
|
|
|
|
/**
|
|
* @abstract
|
|
* @return void
|
|
*/
|
|
abstract public function __clone();
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getTitle()
|
|
{
|
|
return $this->title;
|
|
}
|
|
|
|
/**
|
|
* @param string $title
|
|
*/
|
|
public function setTitle($title)
|
|
{
|
|
$this->title = $title;
|
|
}
|
|
}
|