2013-09-13 14:34:13 +02:00
|
|
|
<?php
|
|
|
|
|
2014-04-15 22:59:59 -03:00
|
|
|
namespace DesignPatterns\Creational\Prototype;
|
2013-09-13 14:34:13 +02:00
|
|
|
|
|
|
|
/**
|
2015-12-21 07:28:20 -05:00
|
|
|
* class BookPrototype.
|
2013-09-13 14:34:13 +02:00
|
|
|
*/
|
|
|
|
abstract class BookPrototype
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $title;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $category;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @abstract
|
2015-12-21 07:28:20 -05:00
|
|
|
*
|
2013-09-13 14:34:13 +02:00
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
abstract public function __clone();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getTitle()
|
|
|
|
{
|
|
|
|
return $this->title;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param string $title
|
|
|
|
*/
|
|
|
|
public function setTitle($title)
|
|
|
|
{
|
|
|
|
$this->title = $title;
|
|
|
|
}
|
|
|
|
}
|