diff --git a/Creational/AbstractFactory/uml/AbstractFactory.uml b/Creational/AbstractFactory/uml/AbstractFactory.uml new file mode 100644 index 0000000..a44e64c --- /dev/null +++ b/Creational/AbstractFactory/uml/AbstractFactory.uml @@ -0,0 +1,38 @@ + + + PHP + \DesignPatterns\Creational\AbstractFactory\AbstractFactory + + \DesignPatterns\Creational\AbstractFactory\Html\Text + \DesignPatterns\Creational\AbstractFactory\Html\Picture + \DesignPatterns\Creational\AbstractFactory\HtmlFactory + \DesignPatterns\Creational\AbstractFactory\JsonFactory + \DesignPatterns\Creational\AbstractFactory\AbstractFactory + \DesignPatterns\Creational\AbstractFactory\MediaInterface + + + + + + + + + + + + + + + + + + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Creational/AbstractFactory/uml/uml.png b/Creational/AbstractFactory/uml/uml.png new file mode 100644 index 0000000..6de2767 Binary files /dev/null and b/Creational/AbstractFactory/uml/uml.png differ diff --git a/Creational/AbstractFactory/uml/uml.svg b/Creational/AbstractFactory/uml/uml.svg new file mode 100644 index 0000000..17b4b70 --- /dev/null +++ b/Creational/AbstractFactory/uml/uml.svg @@ -0,0 +1,379 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + createPicture(path, name) + + + + + + + + + createText(content) + + + + + + + + + + + + + HtmlFactory + + + HtmlFactory + + + + + + + + + + + + + + + + + + render() + + + + + + + + + + + + + Picture + + + Picture + + + + + + + + + + + + + + + + + + render() + + + + + + + + + + + + + Text + + + Text + + + + + + + + + + + + + + + + + + createPicture(path, name) + + + + + + + + + createText(content) + + + + + + + + + + + + + JsonFactory + + + JsonFactory + + + + + + + + + + + + + + + + + + createText(content) + + + + + + + + + createPicture(path, name) + + + + + + + + + + + + + AbstractFactory + + + AbstractFactory + + + + + + + + + + + + + + + + + + render() + + + + + + + + + + + + + MediaInterface + + + MediaInterface + + + + + + + + + + + diff --git a/Creational/Builder/uml/Builder.uml b/Creational/Builder/uml/Builder.uml new file mode 100644 index 0000000..1921c7a --- /dev/null +++ b/Creational/Builder/uml/Builder.uml @@ -0,0 +1,54 @@ + + + PHP + \DesignPatterns\Creational\Builder\BikeBuilder + + \DesignPatterns\Creational\Builder\Parts\Door + \DesignPatterns\Creational\Builder\Parts\Engine + \DesignPatterns\Creational\Builder\CarBuilder + \DesignPatterns\Creational\Builder\Parts\Wheel + \DesignPatterns\Creational\Builder\Parts\Bike + \DesignPatterns\Creational\Builder\Parts\Car + \DesignPatterns\Creational\Builder\BikeBuilder + \DesignPatterns\Creational\Builder\BuilderInterface + \DesignPatterns\Creational\Builder\Parts\Vehicle + \DesignPatterns\Creational\Builder\Director + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Creational/Builder/uml/uml.png b/Creational/Builder/uml/uml.png new file mode 100644 index 0000000..3a990dd Binary files /dev/null and b/Creational/Builder/uml/uml.png differ diff --git a/Creational/Builder/uml/uml.svg b/Creational/Builder/uml/uml.svg new file mode 100644 index 0000000..59fb923 --- /dev/null +++ b/Creational/Builder/uml/uml.svg @@ -0,0 +1,832 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Door + + + Door + + + + + + + + + + + + + + + + + + + + + + Engine + + + Engine + + + + + + + + + + + + + + + + + + + + + + + + + car + + + + + + + + + + + + addDoors() + + + + + + + + + addEngine() + + + + + + + + + addWheel() + + + + + + + + + createVehicle() + + + + + + + + + getVehicle() + + + + + + + + + + + + + CarBuilder + + + CarBuilder + + + + + + + + + + + + + + + + Bike + + + Bike + + + + + + + + + + + + + + + + Wheel + + + Wheel + + + + + + + + + + + + + + + + + + + + + + + + + bike + + + + + + + + + + + + addDoors() + + + + + + + + + addEngine() + + + + + + + + + addWheel() + + + + + + + + + createVehicle() + + + + + + + + + getVehicle() + + + + + + + + + + + + + BikeBuilder + + + BikeBuilder + + + + + + + + + + + + + + + + Car + + + Car + + + + + + + + + + + + + + + + + + + + + + + + + data + + + + + + + + + + + + setPart(key, value) + + + + + + + + + + + + + Vehicle + + + Vehicle + + + + + + + + + + + + + + + + + + + + + + + + createVehicle() + + + + + + + + + addWheel() + + + + + + + + + addEngine() + + + + + + + + + addDoors() + + + + + + + + + getVehicle() + + + + + + + + + + + + + BuilderInterface + + + BuilderInterface + + + + + + + + + + + + + + + + + + + + + + + + build(builder) + + + + + + + + + + + + + Director + + + Director + + + + + + + + + + + + + + + diff --git a/Creational/FactoryMethod/uml/FactoryMethod.uml b/Creational/FactoryMethod/uml/FactoryMethod.uml new file mode 100644 index 0000000..ec4249c --- /dev/null +++ b/Creational/FactoryMethod/uml/FactoryMethod.uml @@ -0,0 +1,55 @@ + + + PHP + \DesignPatterns\Creational\FactoryMethod\Bicycle + + \DesignPatterns\Creational\FactoryMethod\FactoryMethod + \DesignPatterns\Creational\FactoryMethod\Bicycle + \DesignPatterns\Creational\FactoryMethod\GermanFactory + \DesignPatterns\Creational\FactoryMethod\VehicleInterface + \DesignPatterns\Creational\FactoryMethod\ItalianFactory + \DesignPatterns\Creational\FactoryMethod\Ferrari + \DesignPatterns\Creational\FactoryMethod\Porsche + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Creational/FactoryMethod/uml/uml.png b/Creational/FactoryMethod/uml/uml.png new file mode 100644 index 0000000..0687038 Binary files /dev/null and b/Creational/FactoryMethod/uml/uml.png differ diff --git a/Creational/FactoryMethod/uml/uml.svg b/Creational/FactoryMethod/uml/uml.svg new file mode 100644 index 0000000..62b8cc6 --- /dev/null +++ b/Creational/FactoryMethod/uml/uml.svg @@ -0,0 +1,623 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CHEAP + + + + + + + + + + FAST + + + + + + + + + + + + createVehicle(type) + + + + + + + + + create(type) + + + + + + + + + + + + + FactoryMethod + + + FactoryMethod + + + + + + + + + + + + + + + + + + + color + + + + + + + + + + + + setColor(rgb) + + + + + + + + + + + + + Bicycle + + + Bicycle + + + + + + + + + + + + + + + + + + createVehicle(type) + + + + + + + + + + + + + GermanFactory + + + GermanFactory + + + + + + + + + + + + + + + + + + + + + setColor(rgb) + + + + + + + + + + + + + VehicleInterface + + + VehicleInterface + + + + + + + + + + + + + + + + + + + + + + + + createVehicle(type) + + + + + + + + + + + + + ItalianFactory + + + ItalianFactory + + + + + + + + + + + + + + + + + + + color + + + + + + + + + + + + setColor(rgb) + + + + + + + + + + + + + Ferrari + + + Ferrari + + + + + + + + + + + + + + + + + + + + + + + + + color + + + + + + + + + + + + setColor(rgb) + + + + + + + + + addTuningAMG() + + + + + + + + + + + + + Porsche + + + Porsche + + + + + + + + + + + + + + + + + diff --git a/Creational/Multiton/uml/Multiton.uml b/Creational/Multiton/uml/Multiton.uml new file mode 100644 index 0000000..7fbe4db --- /dev/null +++ b/Creational/Multiton/uml/Multiton.uml @@ -0,0 +1,20 @@ + + + PHP + \DesignPatterns\Creational\Multiton\Multiton + + \DesignPatterns\Creational\Multiton\Multiton + + + + + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Creational/Multiton/uml/uml.png b/Creational/Multiton/uml/uml.png new file mode 100644 index 0000000..df5f721 Binary files /dev/null and b/Creational/Multiton/uml/uml.png differ diff --git a/Creational/Multiton/uml/uml.svg b/Creational/Multiton/uml/uml.svg new file mode 100644 index 0000000..fe459ab --- /dev/null +++ b/Creational/Multiton/uml/uml.svg @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + instances + + + + + + + + + + + + + INSTANCE_1 + + + + + + + + + + INSTANCE_2 + + + + + + + + + + + + __construct() + + + + + + + + + + + + getInstance(instanceName) + + + + + + + + + __clone() + + + + + + + + + __wakeup() + + + + + + + + + + + + + Multiton + + + Multiton + + + diff --git a/Creational/Pool/uml/Pool.uml b/Creational/Pool/uml/Pool.uml new file mode 100644 index 0000000..5a770de --- /dev/null +++ b/Creational/Pool/uml/Pool.uml @@ -0,0 +1,22 @@ + + + PHP + \DesignPatterns\Creational\Pool\Processor + + \DesignPatterns\Creational\Pool\Pool + \DesignPatterns\Creational\Pool\Processor + \DesignPatterns\Creational\Pool\Worker + + + + + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Creational/Pool/uml/uml.png b/Creational/Pool/uml/uml.png new file mode 100644 index 0000000..4bcb05c Binary files /dev/null and b/Creational/Pool/uml/uml.png differ diff --git a/Creational/Pool/uml/uml.svg b/Creational/Pool/uml/uml.svg new file mode 100644 index 0000000..4ddd1b4 --- /dev/null +++ b/Creational/Pool/uml/uml.svg @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + instances + + + + + + + + + + class + + + + + + + + + + + + __construct(class) + + + + + + + + + + + + get() + + + + + + + + + dispose(instance) + + + + + + + + + + + + + Pool + + + Pool + + + + + + + + + + + + + + + + + + + pool + + + + + + + + + + processing + + + + + + + + + + maxProcesses + + + + + + + + + + waitingQueue + + + + + + + + + + + + __construct(pool) + + + + + + + + + + + + process(image) + + + + + + + + + createWorker(image) + + + + + + + + + processDone(worker) + + + + + + + + + pushToWaitingQueue(image) + + + + + + + + + popFromWaitingQueue() + + + + + + + + + + + + + Processor + + + Processor + + + + + + + + + + + + + + + + + + __construct() + + + + + + + + + + + + run(image, callback) + + + + + + + + + + + + + Worker + + + Worker + + + diff --git a/Creational/Prototype/uml/Prototype.uml b/Creational/Prototype/uml/Prototype.uml new file mode 100644 index 0000000..2712fba --- /dev/null +++ b/Creational/Prototype/uml/Prototype.uml @@ -0,0 +1,35 @@ + + + PHP + \DesignPatterns\Creational\Prototype\BarBookPrototype + + \DesignPatterns\Creational\Prototype\BookPrototype + \DesignPatterns\Creational\Prototype\FooBookPrototype + \DesignPatterns\Creational\Prototype\BarBookPrototype + + + + + + + + + + + + + + + + + + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Creational/Prototype/uml/uml.png b/Creational/Prototype/uml/uml.png new file mode 100644 index 0000000..23a3b91 Binary files /dev/null and b/Creational/Prototype/uml/uml.png differ diff --git a/Creational/Prototype/uml/uml.svg b/Creational/Prototype/uml/uml.svg new file mode 100644 index 0000000..34844a0 --- /dev/null +++ b/Creational/Prototype/uml/uml.svg @@ -0,0 +1,305 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + category + + + + + + + + + + + + __clone() + + + + + + + + + + + + + FooBookPrototype + + + FooBookPrototype + + + + + + + + + + + + + + + + + + + title + + + + + + + + + + category + + + + + + + + + + + + __clone() + + + + + + + + + getTitle() + + + + + + + + + setTitle(title) + + + + + + + + + + + + + BookPrototype + + + BookPrototype + + + + + + + + + + + + + + + + + + + category + + + + + + + + + + + + __clone() + + + + + + + + + + + + + BarBookPrototype + + + BarBookPrototype + + + + + + + + + + + diff --git a/Creational/SimpleFactory/uml/SimpleFactory.uml b/Creational/SimpleFactory/uml/SimpleFactory.uml new file mode 100644 index 0000000..f51ce6c --- /dev/null +++ b/Creational/SimpleFactory/uml/SimpleFactory.uml @@ -0,0 +1,36 @@ + + + PHP + \DesignPatterns\Creational\SimpleFactory\ConcreteFactory + + \DesignPatterns\Creational\SimpleFactory\Scooter + \DesignPatterns\Creational\SimpleFactory\ConcreteFactory + \DesignPatterns\Creational\SimpleFactory\VehicleInterface + \DesignPatterns\Creational\SimpleFactory\Bicycle + + + + + + + + + + + + + + + + + + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Creational/SimpleFactory/uml/uml.png b/Creational/SimpleFactory/uml/uml.png new file mode 100644 index 0000000..d22c00a Binary files /dev/null and b/Creational/SimpleFactory/uml/uml.png differ diff --git a/Creational/SimpleFactory/uml/uml.svg b/Creational/SimpleFactory/uml/uml.svg new file mode 100644 index 0000000..7c966c2 --- /dev/null +++ b/Creational/SimpleFactory/uml/uml.svg @@ -0,0 +1,286 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + driveTo(destination) + + + + + + + + + + + + + Scooter + + + Scooter + + + + + + + + + + + + + + + + + + + typeList + + + + + + + + + + + + __construct() + + + + + + + + + + + + createVehicle(type) + + + + + + + + + + + + + ConcreteFactory + + + ConcreteFactory + + + + + + + + + + + + + + + + + + driveTo(destination) + + + + + + + + + + + + + VehicleInterface + + + VehicleInterface + + + + + + + + + + + + + + + + + + driveTo(destination) + + + + + + + + + + + + + Bicycle + + + Bicycle + + + + + + + + + + + diff --git a/Creational/Singleton/uml/Singleton.uml b/Creational/Singleton/uml/Singleton.uml new file mode 100644 index 0000000..c56949e --- /dev/null +++ b/Creational/Singleton/uml/Singleton.uml @@ -0,0 +1,20 @@ + + + PHP + \DesignPatterns\Creational\Singleton\Singleton + + \DesignPatterns\Creational\Singleton\Singleton + + + + + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Creational/Singleton/uml/uml.png b/Creational/Singleton/uml/uml.png new file mode 100644 index 0000000..c9a2f19 Binary files /dev/null and b/Creational/Singleton/uml/uml.png differ diff --git a/Creational/Singleton/uml/uml.svg b/Creational/Singleton/uml/uml.svg new file mode 100644 index 0000000..f8e69cf --- /dev/null +++ b/Creational/Singleton/uml/uml.svg @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + instance + + + + + + + + + + + + __construct() + + + + + + + + + + + + getInstance() + + + + + + + + + __clone() + + + + + + + + + __wakeup() + + + + + + + + + + + + + Singleton + + + Singleton + + + diff --git a/Creational/StaticFactory/uml/StaticFactory.uml b/Creational/StaticFactory/uml/StaticFactory.uml new file mode 100644 index 0000000..4137d4d --- /dev/null +++ b/Creational/StaticFactory/uml/StaticFactory.uml @@ -0,0 +1,36 @@ + + + PHP + \DesignPatterns\Creational\StaticFactory\FormatNumber + + \DesignPatterns\Creational\StaticFactory\FormatNumber + \DesignPatterns\Creational\StaticFactory\StaticFactory + \DesignPatterns\Creational\StaticFactory\FormatString + \DesignPatterns\Creational\StaticFactory\FormatterInterface + + + + + + + + + + + + + + + + + + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Creational/StaticFactory/uml/uml.png b/Creational/StaticFactory/uml/uml.png new file mode 100644 index 0000000..f1b6688 Binary files /dev/null and b/Creational/StaticFactory/uml/uml.png differ diff --git a/Creational/StaticFactory/uml/uml.svg b/Creational/StaticFactory/uml/uml.svg new file mode 100644 index 0000000..e57a79b --- /dev/null +++ b/Creational/StaticFactory/uml/uml.svg @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + FormatNumber + + + FormatNumber + + + + + + + + + + + + + + + + + + factory(type) + + + + + + + + + + + + + StaticFactory + + + StaticFactory + + + + + + + + + + + + + + + + FormatString + + + FormatString + + + + + + + + + + + + + + + + FormatterInterface + + + FormatterInterface + + + + + + + + + + +