mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-02-24 09:42:24 +01:00
33 lines
487 B
Plaintext
33 lines
487 B
Plaintext
@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 |