mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-09-26 06:19:20 +02:00
28 lines
484 B
Plaintext
28 lines
484 B
Plaintext
@startuml
|
|
abstract class AbstractConfig {
|
|
#$storage
|
|
+__construct($storage)
|
|
}
|
|
|
|
class ArrayConfig {
|
|
+get($key : string|int, $default = null)
|
|
+set($key : string|int, $value : mixed)
|
|
}
|
|
|
|
class Connection {
|
|
#$configuration : Parameters
|
|
#$host
|
|
+__construct(Parameters $config)
|
|
+connect()
|
|
+getHost()
|
|
}
|
|
|
|
interface Parameters {
|
|
+get($key : string|int)
|
|
+set($key, $value : mixed)
|
|
}
|
|
|
|
AbstractConfig <|.. ArrayConfig
|
|
Parameters <|.. ArrayConfig
|
|
|
|
@enduml |