Skip to content

Commit c8d88b0

Browse files
author
Dominik Liebler
committed
README Prototype
1 parent 02d616a commit c8d88b0

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

Prototype/BookPrototype.php

+1-8
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,7 @@
33
namespace DesignPatterns\Prototype;
44

55
/**
6-
* Prototype pattern
7-
*
8-
* Purpose:
9-
* to avoid the cost of creating objects the standard way (new Foo()) and instead create a prototype and clone it
10-
*
11-
* Examples:
12-
* - Large amounts of data (e.g. create 1,000,000 rows in a database at once via a ORM)
13-
*
6+
* class BookPrototype
147
*/
158
abstract class BookPrototype
169
{

Prototype/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Prototype
2+
3+
## Purpose
4+
5+
To avoid the cost of creating objects the standard way (new Foo()) and instead create a prototype and clone it
6+
7+
## Examples
8+
9+
* Large amounts of data (e.g. create 1,000,000 rows in a database at once via a ORM)

0 commit comments

Comments
 (0)