diff --git a/Structural/Adapter/uml/Adapter.uml b/Structural/Adapter/uml/Adapter.uml new file mode 100644 index 0000000..dec7779 --- /dev/null +++ b/Structural/Adapter/uml/Adapter.uml @@ -0,0 +1,41 @@ + + + PHP + \DesignPatterns\Structural\Adapter\Book + + \DesignPatterns\Structural\Adapter\EBookAdapter + \DesignPatterns\Structural\Adapter\Book + \DesignPatterns\Structural\Adapter\Kindle + \DesignPatterns\Structural\Adapter\EBookInterface + \DesignPatterns\Structural\Adapter\PaperBookInterface + + + + + + + + + + + + + + + + + + + + + + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Structural/Adapter/uml/uml.png b/Structural/Adapter/uml/uml.png index 4c90342..b653077 100644 Binary files a/Structural/Adapter/uml/uml.png and b/Structural/Adapter/uml/uml.png differ diff --git a/Structural/Adapter/uml/uml.svg b/Structural/Adapter/uml/uml.svg index 04259f1..189c56f 100644 --- a/Structural/Adapter/uml/uml.svg +++ b/Structural/Adapter/uml/uml.svg @@ -1 +1,448 @@ -PaperBookInterfaceturnPage()open()EBookInterfacepressNext()pressStart()Bookopen()turnPage()KindlepressNext()pressStart()EBookAdaptereBook : EBookInterface__construct(ebook : EBookInterface)open()turnPage() \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + open() + + + + + + + + + + turnPage() + + + + + + + + + + + + + Book + + + Book + + + + + + + + + + + + + + + + + + + eBook + + + + + + + + + + + + + __construct(ebook) + + + + + + + + + + + + + open() + + + + + + + + + + turnPage() + + + + + + + + + + + + + EBookAdapter + + + EBookAdapter + + + + + + + + + + + + + + + + + + + pressNext() + + + + + + + + + + pressStart() + + + + + + + + + + + + + Kindle + + + Kindle + + + + + + + + + + + + + + + + + + + pressNext() + + + + + + + + + + pressStart() + + + + + + + + + + + + + EBookInterface + + + EBookInterface + + + + + + + + + + + + + + + + + + + turnPage() + + + + + + + + + + open() + + + + + + + + + + + + + PaperBookInterface + + + PaperBookInterface + + + + + + + + + + + + + diff --git a/Structural/Adapter/uml/uml.txt b/Structural/Adapter/uml/uml.txt deleted file mode 100644 index 00aec7d..0000000 --- a/Structural/Adapter/uml/uml.txt +++ /dev/null @@ -1,33 +0,0 @@ -@startuml -interface PaperBookInterface { - +turnPage() - +open() -} - -interface EBookInterface { - +pressNext() - +pressStart() -} - -class Book { - +open() - +turnPage() -} - -class Kindle { - +pressNext() - +pressStart() -} - -class EBookAdapter { - #eBook : EBookInterface - +__construct(ebook : EBookInterface) - +open() - +turnPage() -} - -PaperBookInterface <|.. Book -PaperBookInterface <|.. EBookAdapter -EBookInterface <|.. Kindle -EBookAdapter o-- EBookInterface -@enduml \ No newline at end of file diff --git a/Structural/Bridge/uml/Bridge.uml b/Structural/Bridge/uml/Bridge.uml new file mode 100644 index 0000000..13fa058 --- /dev/null +++ b/Structural/Bridge/uml/Bridge.uml @@ -0,0 +1,50 @@ + + + PHP + \DesignPatterns\Structural\Bridge\Vehicle + + \DesignPatterns\Structural\Bridge\Workshop + \DesignPatterns\Structural\Bridge\Car + \DesignPatterns\Structural\Bridge\Produce + \DesignPatterns\Structural\Bridge\Motorcycle + \DesignPatterns\Structural\Bridge\Assemble + \DesignPatterns\Structural\Bridge\Vehicle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Structural/Bridge/uml/uml.png b/Structural/Bridge/uml/uml.png index ace71af..30f78d1 100644 Binary files a/Structural/Bridge/uml/uml.png and b/Structural/Bridge/uml/uml.png differ diff --git a/Structural/Bridge/uml/uml.svg b/Structural/Bridge/uml/uml.svg index e7b8e4a..8d27913 100644 --- a/Structural/Bridge/uml/uml.svg +++ b/Structural/Bridge/uml/uml.svg @@ -1 +1,451 @@ -Assemblework()Car__construct(Workshop $workShop1, Workshop $workShop2)manufacture()Motorcycle__construct(Workshop $workShop1, Workshop $workShop2)manufacture()Producework()VehicleworkShop1workShop2__construct()manufacture()Workshopwork() \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + work() + + + + + + + + + + + + + Workshop + + + Workshop + + + + + + + + + + + + + + + + + + + __construct(workShop1, workShop2) + + + + + + + + + + + + + manufacture() + + + + + + + + + + + + + Car + + + Car + + + + + + + + + + + + + + + + + + + work() + + + + + + + + + + + + + Produce + + + Produce + + + + + + + + + + + + + + + + + + + __construct(workShop1, workShop2) + + + + + + + + + + + + + manufacture() + + + + + + + + + + + + + Motorcycle + + + Motorcycle + + + + + + + + + + + + + + + + + + + work() + + + + + + + + + + + + + Assemble + + + Assemble + + + + + + + + + + + + + + + + + + + workShop1 + + + + + + + + + + workShop2 + + + + + + + + + + + + + __construct(workShop1, workShop2) + + + + + + + + + + + + + manufacture() + + + + + + + + + + + + + Vehicle + + + Vehicle + + + + + + + + + + + + + + + diff --git a/Structural/Bridge/uml/uml.txt b/Structural/Bridge/uml/uml.txt deleted file mode 100644 index a1100d8..0000000 --- a/Structural/Bridge/uml/uml.txt +++ /dev/null @@ -1,35 +0,0 @@ -@startuml -class Assemble { - +work() -} - -class Car { - +__construct(Workshop $workShop1, Workshop $workShop2) - +manufacture() -} - -class Motorcycle { - +__construct(Workshop $workShop1, Workshop $workShop2) - +manufacture() -} - -class Produce { - +work() -} - -abstract class Vehicle { - #workShop1 - #workShop2 - #__construct() - +manufacture() -} - -interface Workshop { - +work() -} - -Workshop <|.. Assemble -Workshop <|.. Produce -Vehicle <|.. Motorcycle -Vehicle <|.. Car -@enduml \ No newline at end of file diff --git a/Structural/Composite/uml/Composite.uml b/Structural/Composite/uml/Composite.uml new file mode 100644 index 0000000..326dfd3 --- /dev/null +++ b/Structural/Composite/uml/Composite.uml @@ -0,0 +1,42 @@ + + + PHP + \DesignPatterns\Structural\Composite\InputElement + + \DesignPatterns\Structural\Composite\TextElement + \DesignPatterns\Structural\Composite\FormElement + \DesignPatterns\Structural\Composite\InputElement + \DesignPatterns\Structural\Composite\Form + + + + + + + + + + + + + + + + + + + + + + + \DesignPatterns\Structural\Composite\InputElement + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Structural/Composite/uml/uml.png b/Structural/Composite/uml/uml.png index 0009791..70162dc 100644 Binary files a/Structural/Composite/uml/uml.png and b/Structural/Composite/uml/uml.png differ diff --git a/Structural/Composite/uml/uml.svg b/Structural/Composite/uml/uml.svg index f5c616d..1f2196c 100644 --- a/Structural/Composite/uml/uml.svg +++ b/Structural/Composite/uml/uml.svg @@ -1 +1,294 @@ -Formelements : array|FormElement[]render($indent = 0 : int)addElement(FormElement $element)FormElementrender($indent = 0 : int)InputElementrender($indent = 0 : int)TextElementrender($indent = 0 : int) \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + render(indent) + + + + + + + + + + + + + TextElement + + + TextElement + + + + + + + + + + + + + + + + + + + render(indent) + + + + + + + + + + + + + FormElement + + + FormElement + + + + + + + + + + + + + + + + + + + + + + + + + + + + + render(indent) + + + + + + + + + + + + + InputElement + + + InputElement + + + + + + + + + + + + + + + + + + + elements + + + + + + + + + + + + + render(indent) + + + + + + + + + + addElement(element) + + + + + + + + + + + + + Form + + + Form + + + + + + + + + + + + + diff --git a/Structural/DataMapper/uml/DataMapper.uml b/Structural/DataMapper/uml/DataMapper.uml new file mode 100644 index 0000000..697e1f9 --- /dev/null +++ b/Structural/DataMapper/uml/DataMapper.uml @@ -0,0 +1,23 @@ + + + PHP + \DesignPatterns\Structural\DataMapper\User + + \DesignPatterns\Structural\DataMapper\User + \DesignPatterns\Structural\DataMapper\UserMapper + + + + + + \DesignPatterns\Structural\DataMapper\User + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Structural/DataMapper/uml/uml.png b/Structural/DataMapper/uml/uml.png index fabd1a8..05b5812 100644 Binary files a/Structural/DataMapper/uml/uml.png and b/Structural/DataMapper/uml/uml.png differ diff --git a/Structural/DataMapper/uml/uml.svg b/Structural/DataMapper/uml/uml.svg index e40dd5b..dcc452b 100644 --- a/Structural/DataMapper/uml/uml.svg +++ b/Structural/DataMapper/uml/uml.svg @@ -1 +1,413 @@ -User$userId : int$username : string$email : string__construct($id = null : int, $username = null : string, $email = null : string)getUserId()setUserID($userId : int)getUsername()setUsername($username : string)getEmail()setEmail($email : string)UserMapper$adapter : DBAL__construct(DBAL $dbLayer)save(User $user)findById($id : int)findAll()mapObject(array $row) \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + userId + + + + + + + + + + username + + + + + + + + + + email + + + + + + + + + + + + + __construct(id, username, email) + + + + + + + + + + + + + getUserId() + + + + + + + + + + setUserID(userId) + + + + + + + + + + getUsername() + + + + + + + + + + setUsername(username) + + + + + + + + + + getEmail() + + + + + + + + + + setEmail(email) + + + + + + + + + + + + + User + + + User + + + + + + + + + + + + + + + + + + + adapter + + + + + + + + + + + + + __construct(dbLayer) + + + + + + + + + + + + + save(user) + + + + + + + + + + findById(id) + + + + + + + + + + findAll() + + + + + + + + + + mapObject(row) + + + + + + + + + + + + + UserMapper + + + UserMapper + + + diff --git a/Structural/DataMapper/uml/uml.txt b/Structural/DataMapper/uml/uml.txt deleted file mode 100644 index 215a9da..0000000 --- a/Structural/DataMapper/uml/uml.txt +++ /dev/null @@ -1,24 +0,0 @@ -@startuml -class User { - #$userId : int - #$username : string - #$email : string - +__construct($id = null : int, $username = null : string, $email = null : string) - +getUserId() - +setUserID($userId : int) - +getUsername() - +setUsername($username : string) - +getEmail() - +setEmail($email : string) -} - -class UserMapper { - #$adapter : DBAL - +__construct(DBAL $dbLayer) - +save(User $user) - +findById($id : int) - +findAll() - #mapObject(array $row) -} - -@enduml \ No newline at end of file diff --git a/Structural/Decorator/uml/Decorator.uml b/Structural/Decorator/uml/Decorator.uml new file mode 100644 index 0000000..0a80f98 --- /dev/null +++ b/Structural/Decorator/uml/Decorator.uml @@ -0,0 +1,51 @@ + + + PHP + \DesignPatterns\Structural\Decorator\RenderInXml + + \DesignPatterns\Structural\Decorator\RenderInJson + \DesignPatterns\Structural\Decorator\RenderInXml + \DesignPatterns\Structural\Decorator\Webservice + \DesignPatterns\Structural\Decorator\Decorator + \DesignPatterns\Structural\Decorator\RendererInterface + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \DesignPatterns\Structural\Decorator\RenderInXml + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Structural/Decorator/uml/uml.png b/Structural/Decorator/uml/uml.png index e1e83f2..1194a62 100644 Binary files a/Structural/Decorator/uml/uml.png and b/Structural/Decorator/uml/uml.png differ diff --git a/Structural/Decorator/uml/uml.svg b/Structural/Decorator/uml/uml.svg index 2abab18..83aaa4e 100644 --- a/Structural/Decorator/uml/uml.svg +++ b/Structural/Decorator/uml/uml.svg @@ -1 +1,369 @@ -RendererInterfacerenderData()Decorator$wrapped : RendererInterface__construct(RendererInterface $wrappable)RenderInJsonrenderData()RenderInXmlrenderData()Webservice$data : mixed__construct($data)renderData() \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + renderData() + + + + + + + + + + + + + RenderInJson + + + RenderInJson + + + + + + + + + + + + + + + + + + + + + + + + + + + + + renderData() + + + + + + + + + + + + + RenderInXml + + + RenderInXml + + + + + + + + + + + + + + + + + + + data + + + + + + + + + + + + + __construct(data) + + + + + + + + + + + + + renderData() + + + + + + + + + + + + + Webservice + + + Webservice + + + + + + + + + + + + + + + + + + + wrapped + + + + + + + + + + + + + __construct(wrappable) + + + + + + + + + + + + + Decorator + + + Decorator + + + + + + + + + + + + + + + + + + + renderData() + + + + + + + + + + + + + RendererInterface + + + RendererInterface + + + + + + + + + + + + + + + diff --git a/Structural/Decorator/uml/uml.txt b/Structural/Decorator/uml/uml.txt deleted file mode 100644 index 2561cf7..0000000 --- a/Structural/Decorator/uml/uml.txt +++ /dev/null @@ -1,29 +0,0 @@ -@startuml -interface RendererInterface { - +renderData() -} - -abstract class Decorator { - #$wrapped : RendererInterface - +__construct(RendererInterface $wrappable) -} - -class RenderInJson { - +renderData() -} - -class RenderInXml { - +renderData() -} - -class Webservice { - #$data : mixed - +__construct($data) - +renderData() -} - -Decorator <|.. RenderInJson -Decorator <|.. RenderInXml -RendererInterface <|.. Decorator -RendererInterface <|.. Webservice -@enduml \ No newline at end of file diff --git a/Structural/DependencyInjection/uml/DependencyInjection.uml b/Structural/DependencyInjection/uml/DependencyInjection.uml new file mode 100644 index 0000000..e058b19 --- /dev/null +++ b/Structural/DependencyInjection/uml/DependencyInjection.uml @@ -0,0 +1,38 @@ + + + PHP + \DesignPatterns\Structural\DependencyInjection\AbstractConfig + + \DesignPatterns\Structural\DependencyInjection\Connection + \DesignPatterns\Structural\DependencyInjection\ArrayConfig + \DesignPatterns\Structural\DependencyInjection\Parameters + \DesignPatterns\Structural\DependencyInjection\AbstractConfig + + + + + + + + + + + + + + + + + + + \DesignPatterns\Structural\DependencyInjection\AbstractConfig + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Structural/DependencyInjection/uml/uml.png b/Structural/DependencyInjection/uml/uml.png index f38b80b..91cdcb0 100644 Binary files a/Structural/DependencyInjection/uml/uml.png and b/Structural/DependencyInjection/uml/uml.png differ diff --git a/Structural/DependencyInjection/uml/uml.svg b/Structural/DependencyInjection/uml/uml.svg index 1014592..2f75b09 100644 --- a/Structural/DependencyInjection/uml/uml.svg +++ b/Structural/DependencyInjection/uml/uml.svg @@ -1 +1,432 @@ -AbstractConfig$storage__construct($storage)ArrayConfigget($key : string|int, $default = null)set($key : string|int, $value : mixed)Connection$configuration : Parameters$host__construct(Parameters $config)connect()getHost()Parametersget($key : string|int)set($key, $value : mixed) \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + configuration + + + + + + + + + + host + + + + + + + + + + + + + __construct(config) + + + + + + + + + + + + + connect() + + + + + + + + + + getHost() + + + + + + + + + + + + + Connection + + + Connection + + + + + + + + + + + + + + + + + + + get(key, default) + + + + + + + + + + set(key, value) + + + + + + + + + + + + + ArrayConfig + + + ArrayConfig + + + + + + + + + + + + + + + + + + + get(key) + + + + + + + + + + set(key, value) + + + + + + + + + + + + + Parameters + + + Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + storage + + + + + + + + + + + + + __construct(storage) + + + + + + + + + + + + + AbstractConfig + + + AbstractConfig + + + + + + + + + + + diff --git a/Structural/DependencyInjection/uml/uml.txt b/Structural/DependencyInjection/uml/uml.txt deleted file mode 100644 index b6765c5..0000000 --- a/Structural/DependencyInjection/uml/uml.txt +++ /dev/null @@ -1,28 +0,0 @@ -@startuml -abstract class AbstractConfig { - #$storage - +__construct($storage) -} - -class ArrayConfig { - +get($key : string|int, $default = null) - +set($key : string|int, $value : mixed) -} - -class Connection { - #$configuration : Parameters - #$host - +__construct(Parameters $config) - +connect() - +getHost() -} - -interface Parameters { - +get($key : string|int) - +set($key, $value : mixed) -} - -AbstractConfig <|.. ArrayConfig -Parameters <|.. ArrayConfig - -@enduml \ No newline at end of file diff --git a/Structural/Facade/uml/Facade.uml b/Structural/Facade/uml/Facade.uml new file mode 100644 index 0000000..d6bdd03 --- /dev/null +++ b/Structural/Facade/uml/Facade.uml @@ -0,0 +1,24 @@ + + + PHP + \DesignPatterns\Structural\Facade\BiosInterface + + \DesignPatterns\Structural\Facade\BiosInterface + \DesignPatterns\Structural\Facade\OsInterface + \DesignPatterns\Structural\Facade\Facade + + + + + + \DesignPatterns\Structural\Facade\BiosInterface + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Structural/Facade/uml/uml.png b/Structural/Facade/uml/uml.png index 2e68ca6..e13cbdc 100644 Binary files a/Structural/Facade/uml/uml.png and b/Structural/Facade/uml/uml.png differ diff --git a/Structural/Facade/uml/uml.svg b/Structural/Facade/uml/uml.svg index cf65d10..8f7dd83 100644 --- a/Structural/Facade/uml/uml.svg +++ b/Structural/Facade/uml/uml.svg @@ -1 +1,349 @@ -BiosInterfaceexecute()waitForKeyPress()launch(OsInterface $os)powerDown()Facade$os : OsInterface$bios : BiosInterface__construct(BiosInterface $bios, OsInterface $os)turnOn()turnOff()OsInterfacehalt() \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + execute() + + + + + + + + + + waitForKeyPress() + + + + + + + + + + launch(os) + + + + + + + + + + powerDown() + + + + + + + + + + + + + BiosInterface + + + BiosInterface + + + + + + + + + + + + + + + + + + + halt() + + + + + + + + + + + + + OsInterface + + + OsInterface + + + + + + + + + + + + + + + + + + + os + + + + + + + + + + bios + + + + + + + + + + + + + __construct(bios, os) + + + + + + + + + + + + + turnOn() + + + + + + + + + + turnOff() + + + + + + + + + + + + + Facade + + + Facade + + + diff --git a/Structural/Facade/uml/uml.txt b/Structural/Facade/uml/uml.txt deleted file mode 100644 index e4b0b94..0000000 --- a/Structural/Facade/uml/uml.txt +++ /dev/null @@ -1,20 +0,0 @@ -@startuml -interface BiosInterface { - +execute() - +waitForKeyPress() - +launch(OsInterface $os) - +powerDown() -} - -class Facade { - #$os : OsInterface - #$bios : BiosInterface - +__construct(BiosInterface $bios, OsInterface $os) - +turnOn() - +turnOff() -} - -interface OsInterface { - +halt() -} -@enduml \ No newline at end of file diff --git a/Structural/FluentInterface/uml/FluentInterface.uml b/Structural/FluentInterface/uml/FluentInterface.uml new file mode 100644 index 0000000..8fca787 --- /dev/null +++ b/Structural/FluentInterface/uml/FluentInterface.uml @@ -0,0 +1,22 @@ + + + PHP + \DesignPatterns\Structural\FluentInterface\Sql + + \DesignPatterns\Structural\FluentInterface\Sql + + + + + + \DesignPatterns\Structural\FluentInterface\Sql + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Structural/FluentInterface/uml/uml.png b/Structural/FluentInterface/uml/uml.png index a1b6b5e..e8229a2 100644 Binary files a/Structural/FluentInterface/uml/uml.png and b/Structural/FluentInterface/uml/uml.png differ diff --git a/Structural/FluentInterface/uml/uml.svg b/Structural/FluentInterface/uml/uml.svg index f7c3013..a836466 100644 --- a/Structural/FluentInterface/uml/uml.svg +++ b/Structural/FluentInterface/uml/uml.svg @@ -1 +1,201 @@ -Sql$fields : array$from : array$where : arrayselect(array $fields = array())from($table : string, $alias : string)where($condition : string)getQuery() \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fields + + + + + + + + + + from + + + + + + + + + + where + + + + + + + + + + + + + select(fields) + + + + + + + + + + from(table, alias) + + + + + + + + + + where(condition) + + + + + + + + + + getQuery() + + + + + + + + + + + + + Sql + + + Sql + + + diff --git a/Structural/FluentInterface/uml/uml.txt b/Structural/FluentInterface/uml/uml.txt deleted file mode 100644 index 17a76e2..0000000 --- a/Structural/FluentInterface/uml/uml.txt +++ /dev/null @@ -1,13 +0,0 @@ -@startuml - -class Sql { - #$fields : array - #$from : array - #$where : array - +select(array $fields = array()) - +from($table : string, $alias : string) - +where($condition : string) - +getQuery() -} - -@enduml \ No newline at end of file diff --git a/Structural/Proxy/uml/Proxy.uml b/Structural/Proxy/uml/Proxy.uml new file mode 100644 index 0000000..9b407e1 --- /dev/null +++ b/Structural/Proxy/uml/Proxy.uml @@ -0,0 +1,28 @@ + + + PHP + \DesignPatterns\Structural\Proxy\Record + + \DesignPatterns\Structural\Proxy\Record + \DesignPatterns\Structural\Proxy\RecordProxy + + + + + + + + + + + \DesignPatterns\Structural\Proxy\Record + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Structural/Proxy/uml/uml.png b/Structural/Proxy/uml/uml.png index 2d7b804..82f548a 100644 Binary files a/Structural/Proxy/uml/uml.png and b/Structural/Proxy/uml/uml.png differ diff --git a/Structural/Proxy/uml/uml.svg b/Structural/Proxy/uml/uml.svg index 939c8e6..1ec1d46 100644 --- a/Structural/Proxy/uml/uml.svg +++ b/Structural/Proxy/uml/uml.svg @@ -1 +1,281 @@ -Record$data : array|null__construct($data = null)__set($name : string, $value : mixed)__get($name : string)RecordProxy$isDirty : bool$isInitialized : bool__construct(data : array)__set($name : string, $value : mixed) \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + data + + + + + + + + + + + + + __construct(data) + + + + + + + + + + + + + __set(name, value) + + + + + + + + + + __get(name) + + + + + + + + + + + + + Record + + + Record + + + + + + + + + + + + + + + + + + + isDirty + + + + + + + + + + isInitialized + + + + + + + + + + + + + __construct(data) + + + + + + + + + + + + + __set(name, value) + + + + + + + + + + + + + RecordProxy + + + RecordProxy + + + + + + + + + diff --git a/Structural/Proxy/uml/uml.txt b/Structural/Proxy/uml/uml.txt deleted file mode 100644 index 22c5272..0000000 --- a/Structural/Proxy/uml/uml.txt +++ /dev/null @@ -1,18 +0,0 @@ -@startuml - -class Record { - #$data : array|null - +__construct($data = null) - +__set($name : string, $value : mixed) - +__get($name : string) -} - -class RecordProxy { - #$isDirty : bool - #$isInitialized : bool - +__construct(data : array) - +__set($name : string, $value : mixed) -} - -Record <|.. RecordProxy -@enduml \ No newline at end of file diff --git a/Structural/Registry/uml/Registry.uml b/Structural/Registry/uml/Registry.uml new file mode 100644 index 0000000..564dbc9 --- /dev/null +++ b/Structural/Registry/uml/Registry.uml @@ -0,0 +1,22 @@ + + + PHP + \DesignPatterns\Structural\Registry\Registry + + \DesignPatterns\Structural\Registry\Registry + + + + + + \DesignPatterns\Structural\Registry\Registry + + + Fields + Constants + Constructors + Methods + + private + + diff --git a/Structural/Registry/uml/uml.png b/Structural/Registry/uml/uml.png index 3697b8e..9f92dcb 100644 Binary files a/Structural/Registry/uml/uml.png and b/Structural/Registry/uml/uml.png differ diff --git a/Structural/Registry/uml/uml.svg b/Structural/Registry/uml/uml.svg index fe0991d..7daccac 100644 --- a/Structural/Registry/uml/uml.svg +++ b/Structural/Registry/uml/uml.svg @@ -1 +1,152 @@ -Registrystatic $storedValues : array;static function set($key : string, $value : mixed)static function get($key : string) \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + storedValues + + + + + + + + + + + + + LOGGER + + + + + + + + + + + + + + set(key, value) + + + + + + + + + + + get(key) + + + + + + + + + + + + + Registry + + + Registry + + + diff --git a/Structural/Registry/uml/uml.txt b/Structural/Registry/uml/uml.txt deleted file mode 100644 index 483e60f..0000000 --- a/Structural/Registry/uml/uml.txt +++ /dev/null @@ -1,9 +0,0 @@ -@startuml - -abstract class Registry { - #static $storedValues : array; - +static function set($key : string, $value : mixed) - +static function get($key : string) -} - -@enduml \ No newline at end of file