Skip to content

Latest commit

 

History

History
 
 

Prototype

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

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).

UML Diagram

Alt Prototype UML Diagram

Code

You can also find these code on GitHub

index.php

index.php

BookPrototype.php

BookPrototype.php

BarBookPrototype.php

BarBookPrototype.php

FooBookPrototype.php

FooBookPrototype.php

Test