mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-02-24 01:32:22 +01:00
43 lines
575 B
PHP
43 lines
575 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;
|
|
}
|
|
}
|