Refactored Decorator pattern

This commit is contained in:
Dominik Liebler
2018-06-22 10:11:47 +02:00
parent 4c0fbf4a7c
commit f0f5ee9bef
3 changed files with 144 additions and 431 deletions

View File

@@ -1,45 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<Diagram>
<ID>PHP</ID>
<OriginalElement>\DesignPatterns\Structural\Decorator\RenderInXml</OriginalElement>
<OriginalElement>\DesignPatterns\Structural\Decorator\Booking</OriginalElement>
<nodes>
<node x="139.0" y="236.0">\DesignPatterns\Structural\Decorator\RenderInJson</node>
<node x="0.0" y="236.0">\DesignPatterns\Structural\Decorator\RenderInXml</node>
<node x="216.0" y="97.0">\DesignPatterns\Structural\Decorator\Webservice</node>
<node x="62.0" y="107.5">\DesignPatterns\Structural\Decorator\Decorator</node>
<node x="145.0" y="0.0">\DesignPatterns\Structural\Decorator\RendererInterface</node>
<node x="176.0" y="247.0">\DesignPatterns\Structural\Decorator\WiFi</node>
<node x="288.0" y="123.5">\DesignPatterns\Structural\Decorator\DoubleRoomBooking</node>
<node x="0.0" y="247.0">\DesignPatterns\Structural\Decorator\ExtraBed</node>
<node x="189.25" y="0.0">\DesignPatterns\Structural\Decorator\Booking</node>
<node x="64.0" y="123.0">\DesignPatterns\Structural\Decorator\BookingDecorator</node>
</nodes>
<notes />
<edges>
<edge source="\DesignPatterns\Structural\Decorator\RenderInJson" target="\DesignPatterns\Structural\Decorator\Decorator">
<point x="0.0" y="-23.5" />
<point x="198.5" y="211.0" />
<point x="162.5" y="211.0" />
<point x="33.500000000000014" y="34.0" />
<edge source="\DesignPatterns\Structural\Decorator\WiFi" target="\DesignPatterns\Structural\Decorator\BookingDecorator">
<point x="0.0" y="-48.0" />
<point x="254.0" y="222.0" />
<point x="217.0" y="222.0" />
<point x="51.0" y="37.0" />
</edge>
<edge source="\DesignPatterns\Structural\Decorator\RenderInXml" target="\DesignPatterns\Structural\Decorator\Decorator">
<point x="0.0" y="-23.5" />
<point x="59.5" y="211.0" />
<point x="95.5" y="211.0" />
<point x="-33.5" y="34.0" />
<edge source="\DesignPatterns\Structural\Decorator\BookingDecorator" target="\DesignPatterns\Structural\Decorator\Booking">
<point x="0.0" y="-37.0" />
<point x="166.0" y="98.0" />
<point x="228.25" y="98.0" />
<point x="-39.0" y="36.5" />
</edge>
<edge source="\DesignPatterns\Structural\Decorator\Webservice" target="\DesignPatterns\Structural\Decorator\RendererInterface">
<point x="0.0" y="-44.5" />
<point x="283.0" y="72.0" />
<point x="236.5" y="72.0" />
<point x="30.5" y="23.5" />
<edge source="\DesignPatterns\Structural\Decorator\ExtraBed" target="\DesignPatterns\Structural\Decorator\BookingDecorator">
<point x="0.0" y="-48.0" />
<point x="78.0" y="222.0" />
<point x="115.0" y="222.0" />
<point x="-51.0" y="37.0" />
</edge>
<edge source="\DesignPatterns\Structural\Decorator\Decorator" target="\DesignPatterns\Structural\Decorator\RendererInterface">
<point x="1.4210854715202004E-14" y="-34.0" />
<point x="129.0" y="72.0" />
<point x="175.5" y="72.0" />
<point x="-30.5" y="23.5" />
<edge source="\DesignPatterns\Structural\Decorator\DoubleRoomBooking" target="\DesignPatterns\Structural\Decorator\Booking">
<point x="0.0" y="-36.5" />
<point x="368.5" y="98.0" />
<point x="306.25" y="98.0" />
<point x="39.0" y="36.5" />
</edge>
</edges>
<settings layout="Hierarchic Group" zoom="1.0" x="175.0" y="141.5" />
<SelectedNodes>
<node>\DesignPatterns\Structural\Decorator\RenderInXml</node>
</SelectedNodes>
<settings layout="Hierarchic Group" zoom="1.0" x="172.0" y="93.5" />
<SelectedNodes />
<Categories>
<Category>Fields</Category>
<Category>Constants</Category>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 45 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 77 KiB