mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-06-05 21:46:21 +02:00
Added Facade UML
This commit is contained in:
parent
aef2f34993
commit
0a47cdaccd
@ -15,3 +15,7 @@ That's why a good facade has no `new` in it. If there are multiple creations for
|
||||
|
||||
The best facade has no `new` and a constructor with interface-type-hinted parameters.
|
||||
If you need creation of new instances, use a Factory as argument.
|
||||
|
||||
## UML Diagram
|
||||
|
||||

|
BIN
Structural/Facade/uml/uml.png
Normal file
BIN
Structural/Facade/uml/uml.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
1
Structural/Facade/uml/uml.svg
Normal file
1
Structural/Facade/uml/uml.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 5.8 KiB |
20
Structural/Facade/uml/uml.txt
Normal file
20
Structural/Facade/uml/uml.txt
Normal file
@ -0,0 +1,20 @@
|
||||
@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
|
Loading…
x
Reference in New Issue
Block a user