@startuml set namespaceSeparator \\ class PDO { + __construct(\n\tdsn : string,\n\tusername :string := null,\n\tpassword : string := null,\n\toptions : array := null\n\t) + lastInsertId(\n\tname : string := null\n\t): string|false + prepare(\n\tquery : string,\n\toptions : array := []\n\t): PDOStatement|false } ' class PDOStatement implements IteratorAggregate { class PDOStatement { + bindValue(...): bool + execute(params : array := null): bool + fetch(...): mixed + fetchAll(...): array + rowCount(): int + setFetchMode(...): bool } namespace Database { class MyPdo { ' - {static} myPdoInstance : MyPdo - {static} dsn : string - {static} username : string := '' - {static} password : string := '' - {static} options : array := [] - __construct(\n\tdsn : string,\n\tusername : string := null,\n\tpassword : string := null,\n\toptions : array := null) - private __clone() : void + {static} getInstance() : MyPdo + {static} setConfiguration(\n\tdsn : string,\n\tusername : string := '',\n\tpassword : string := '',\n\toptions : array := []) : void - {static} hasConfiguration() : bool - {static} setConfigurationFromEnvironmentVariables() : bool - {static} setConfigurationFromIniFile() : bool } } Database\\MyPdo -up-|> PDO PDO .right.> PDOStatement : "<>" Database\\MyPdo "1" *--> "0..1 \n-myPdoInstance" Database\\MyPdo : contains @enduml