mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-05 14:37:27 +02:00
README Prototype
This commit is contained in:
@@ -3,14 +3,7 @@
|
|||||||
namespace DesignPatterns\Prototype;
|
namespace DesignPatterns\Prototype;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prototype pattern
|
* class BookPrototype
|
||||||
*
|
|
||||||
* Purpose:
|
|
||||||
* to avoid the cost of creating objects the standard way (new Foo()) and instead create a prototype and clone it
|
|
||||||
*
|
|
||||||
* Examples:
|
|
||||||
* - Large amounts of data (e.g. create 1,000,000 rows in a database at once via a ORM)
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
abstract class BookPrototype
|
abstract class BookPrototype
|
||||||
{
|
{
|
||||||
|
9
Prototype/README.md
Normal file
9
Prototype/README.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Prototype
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
|
||||||
|
To avoid the cost of creating objects the standard way (new Foo()) and instead create a prototype and clone it
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
* Large amounts of data (e.g. create 1,000,000 rows in a database at once via a ORM)
|
Reference in New Issue
Block a user