mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-08 07:56:36 +02:00
start a restructure
This commit is contained in:
41
Creational/Prototype/BookPrototype.php
Normal file
41
Creational/Prototype/BookPrototype.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace DesignPatterns\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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user