diff --git a/Structural/Adapter/README.md b/Structural/Adapter/README.md index e168dda..d2390df 100644 --- a/Structural/Adapter/README.md +++ b/Structural/Adapter/README.md @@ -11,4 +11,4 @@ To translate one interface for a class into a compatible interface. An adapter a ## UML Diagram - \ No newline at end of file + \ No newline at end of file diff --git a/Structural/Adapter/uml.png b/Structural/Adapter/uml/uml.png similarity index 100% rename from Structural/Adapter/uml.png rename to Structural/Adapter/uml/uml.png diff --git a/Structural/Adapter/uml.svg b/Structural/Adapter/uml/uml.svg similarity index 100% rename from Structural/Adapter/uml.svg rename to Structural/Adapter/uml/uml.svg diff --git a/Structural/Adapter/uml.txt b/Structural/Adapter/uml/uml.txt similarity index 100% rename from Structural/Adapter/uml.txt rename to Structural/Adapter/uml/uml.txt diff --git a/Structural/Bridge/README.md b/Structural/Bridge/README.md index a318cb6..b4bf4fd 100644 --- a/Structural/Bridge/README.md +++ b/Structural/Bridge/README.md @@ -9,4 +9,4 @@ independently. (http://en.wikipedia.org/wiki/Bridge_pattern) ## UML Diagram - \ No newline at end of file + \ No newline at end of file diff --git a/Structural/Bridge/uml.png b/Structural/Bridge/uml/uml.png similarity index 100% rename from Structural/Bridge/uml.png rename to Structural/Bridge/uml/uml.png diff --git a/Structural/Bridge/uml.svg b/Structural/Bridge/uml/uml.svg similarity index 100% rename from Structural/Bridge/uml.svg rename to Structural/Bridge/uml/uml.svg diff --git a/Structural/Bridge/uml.txt b/Structural/Bridge/uml/uml.txt similarity index 100% rename from Structural/Bridge/uml.txt rename to Structural/Bridge/uml/uml.txt diff --git a/Structural/Composite/README.md b/Structural/Composite/README.md index ae22908..f0ca01c 100755 --- a/Structural/Composite/README.md +++ b/Structural/Composite/README.md @@ -2,7 +2,7 @@ # Purpose -To treat a group of objects the same way as a single instance of the object. +To treat a group of objects the same way as a single instance of the object. # Examples @@ -10,3 +10,6 @@ To treat a group of objects the same way as a single instance of the object. subsequently runs through all its child elements and calls `render()` on them * `Zend_Config`: a tree of configuration options, each one is a `Zend_Config` object itself +## UML Diagram + + \ No newline at end of file diff --git a/Structural/Composite/uml/uml.png b/Structural/Composite/uml/uml.png new file mode 100644 index 0000000..e353446 Binary files /dev/null and b/Structural/Composite/uml/uml.png differ diff --git a/Structural/Composite/uml/uml.svg b/Structural/Composite/uml/uml.svg new file mode 100644 index 0000000..6c1cb5c --- /dev/null +++ b/Structural/Composite/uml/uml.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="226pt" style="width:569px;height:226px;" version="1.1" viewBox="0 0 569 226" width="569pt"><defs><filter height="300%" id="f1" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><rect fill="#FEFECE" filter="url(#f1)" height="86.8652" style="stroke: #A80036; stroke-width: 1.5;" width="218" x="6" y="130.5"/><ellipse cx="96.25" cy="146.5" fill="#ADD1B2" rx="11" ry="11" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M99.2231,152.1431 Q98.6421,152.4419 98.0029,152.5913 Q97.3638,152.7407 96.6582,152.7407 Q94.1514,152.7407 92.8315,151.0889 Q91.5117,149.437 91.5117,146.3159 Q91.5117,143.1865 92.8315,141.5347 Q94.1514,139.8828 96.6582,139.8828 Q97.3638,139.8828 98.0112,140.0322 Q98.6587,140.1816 99.2231,140.4805 L99.2231,143.2031 Q98.5923,142.6221 97.9988,142.3523 Q97.4053,142.0825 96.7744,142.0825 Q95.4297,142.0825 94.7449,143.1492 Q94.0601,144.2158 94.0601,146.3159 Q94.0601,148.4077 94.7449,149.4744 Q95.4297,150.541 96.7744,150.541 Q97.4053,150.541 97.9988,150.2712 Q98.5923,150.0015 99.2231,149.4204 Z "/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="29" x="116.75" y="151.0352">Form</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="223" y1="162.5" y2="162.5"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="103" x="12" y="177.1348">protected elements</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="223" y1="183.4551" y2="183.4551"/><ellipse cx="17" cy="195.4326" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="107" x="26" y="198.0898">render($indent = 0)</text><ellipse cx="17" cy="208.3877" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="192" x="26" y="211.0449">addElement(FormElement $element)</text><rect fill="#FEFECE" filter="url(#f1)" height="60.9551" style="stroke: #A80036; stroke-width: 1.5;" width="133" x="259.75" y="8.5"/><ellipse cx="286.45" cy="24.5" fill="#A9DCDF" rx="11" ry="11" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M286.5633,19.8481 L285.4095,24.9199 L287.7254,24.9199 Z M285.0691,17.6069 L288.0657,17.6069 L291.4109,30 L288.9622,30 L288.1985,26.937 L284.9197,26.937 L284.1727,30 L281.7239,30 Z "/><text fill="#000000" font-family="sans-serif" font-size="12" font-style="italic" lengthAdjust="spacingAndGlyphs" textLength="75" x="303.05" y="29.0352">FormElement</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="260.75" x2="391.75" y1="40.5" y2="40.5"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="260.75" x2="391.75" y1="48.5" y2="48.5"/><ellipse cx="270.75" cy="60.4775" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="107" x="279.75" y="63.1348">render($indent = 0)</text><rect fill="#FEFECE" filter="url(#f1)" height="60.9551" style="stroke: #A80036; stroke-width: 1.5;" width="133" x="259.75" y="143.5"/><ellipse cx="286.45" cy="159.5" fill="#ADD1B2" rx="11" ry="11" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M289.4231,165.1431 Q288.8421,165.4419 288.2029,165.5913 Q287.5638,165.7407 286.8582,165.7407 Q284.3514,165.7407 283.0315,164.0889 Q281.7117,162.437 281.7117,159.3159 Q281.7117,156.1865 283.0315,154.5347 Q284.3514,152.8828 286.8582,152.8828 Q287.5638,152.8828 288.2112,153.0322 Q288.8587,153.1816 289.4231,153.4805 L289.4231,156.2031 Q288.7923,155.6221 288.1988,155.3523 Q287.6053,155.0825 286.9744,155.0825 Q285.6297,155.0825 284.9449,156.1492 Q284.2601,157.2158 284.2601,159.3159 Q284.2601,161.4077 284.9449,162.4744 Q285.6297,163.541 286.9744,163.541 Q287.6053,163.541 288.1988,163.2712 Q288.7923,163.0015 289.4231,162.4204 Z "/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="75" x="303.05" y="164.0352">InputElement</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="260.75" x2="391.75" y1="175.5" y2="175.5"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="260.75" x2="391.75" y1="183.5" y2="183.5"/><ellipse cx="270.75" cy="195.4775" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="107" x="279.75" y="198.1348">render($indent = 0)</text><rect fill="#FEFECE" filter="url(#f1)" height="60.9551" style="stroke: #A80036; stroke-width: 1.5;" width="133" x="427.75" y="143.5"/><ellipse cx="455.8" cy="159.5" fill="#ADD1B2" rx="11" ry="11" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M458.7731,165.1431 Q458.1921,165.4419 457.5529,165.5913 Q456.9138,165.7407 456.2082,165.7407 Q453.7014,165.7407 452.3815,164.0889 Q451.0617,162.437 451.0617,159.3159 Q451.0617,156.1865 452.3815,154.5347 Q453.7014,152.8828 456.2082,152.8828 Q456.9138,152.8828 457.5612,153.0322 Q458.2087,153.1816 458.7731,153.4805 L458.7731,156.2031 Q458.1423,155.6221 457.5488,155.3523 Q456.9553,155.0825 456.3244,155.0825 Q454.9797,155.0825 454.2949,156.1492 Q453.6101,157.2158 453.6101,159.3159 Q453.6101,161.4077 454.2949,162.4744 Q454.9797,163.541 456.3244,163.541 Q456.9553,163.541 457.5488,163.2712 Q458.1423,163.0015 458.7731,162.4204 Z "/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="72" x="472.7" y="164.0352">TextElement</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="428.75" x2="559.75" y1="175.5" y2="175.5"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="428.75" x2="559.75" y1="183.5" y2="183.5"/><ellipse cx="438.75" cy="195.4775" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="107" x="447.75" y="198.1348">render($indent = 0)</text><path d="M379.09,82.03 C404.261,101.957 433.734,125.2898 456.529,143.3358 " fill="none" style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 7.0,7.0;"/><polygon fill="none" points="374.621,87.419,363.285,69.517,383.311,76.443,374.621,87.419" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M326,89.791 C326,107.727 326,127.3957 326,143.1056 " fill="none" style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 7.0,7.0;"/><polygon fill="none" points="319,89.517,326,69.517,333,89.517,319,89.517" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M262.039,80.317 C236.891,96.168 207.997,114.381 182.514,130.4436 " fill="none" style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 7.0,7.0;"/><polygon fill="none" points="258.52,74.26,279.172,69.517,265.986,86.104,258.52,74.26" style="stroke: #A80036; stroke-width: 1.0;"/></g></svg> \ No newline at end of file diff --git a/Structural/Composite/uml/uml.txt b/Structural/Composite/uml/uml.txt new file mode 100644 index 0000000..598a697 --- /dev/null +++ b/Structural/Composite/uml/uml.txt @@ -0,0 +1,23 @@ +@startuml +class Form { + protected elements + +render($indent = 0) + +addElement(FormElement $element) +} + +abstract class FormElement { + +render($indent = 0) +} + +class InputElement { + +render($indent = 0) +} + +class TextElement { + +render($indent = 0) +} + +FormElement <|.. TextElement +FormElement <|.. InputElement +FormElement <|.. Form +@enduml \ No newline at end of file