mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-05 06:27:25 +02:00
Added Decorator UML
This commit is contained in:
BIN
Structural/Decorator/uml/uml.png
Normal file
BIN
Structural/Decorator/uml/uml.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
1
Structural/Decorator/uml/uml.svg
Normal file
1
Structural/Decorator/uml/uml.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 8.9 KiB |
29
Structural/Decorator/uml/uml.txt
Normal file
29
Structural/Decorator/uml/uml.txt
Normal file
@@ -0,0 +1,29 @@
|
||||
@startuml
|
||||
interface RendererInterface {
|
||||
+renderData()
|
||||
}
|
||||
|
||||
abstract class Decorator {
|
||||
# protected $wrapped : RendererInterface
|
||||
+__construct(RendererInterface $wrappable)
|
||||
}
|
||||
|
||||
class RenderInJson {
|
||||
+renderData()
|
||||
}
|
||||
|
||||
class RenderInXml {
|
||||
+renderData()
|
||||
}
|
||||
|
||||
class Webservice {
|
||||
protected $data
|
||||
+__construct($data)
|
||||
+renderData()
|
||||
}
|
||||
|
||||
Decorator <|.. RenderInJson
|
||||
Decorator <|.. RenderInXml
|
||||
RendererInterface <|.. Decorator
|
||||
RendererInterface <|.. Webservice
|
||||
@enduml
|
Reference in New Issue
Block a user