mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-01 12:40:11 +02:00
Added DataMapper UML
This commit is contained in:
BIN
Structural/DataMapper/uml/uml.png
Normal file
BIN
Structural/DataMapper/uml/uml.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
1
Structural/DataMapper/uml/uml.svg
Normal file
1
Structural/DataMapper/uml/uml.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="96pt" style="width:197px;height:96px;background:#000000;" version="1.1" viewBox="0 0 197 96" width="197pt"><defs/><g><text fill="#33FF02" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="164" x="0" y="13.5352">... (skipping 20 lines) ...</text><text fill="#33FF02" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="176" x="20" y="30.0234">+mapObject(array $row)</text><text fill="#33FF02" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="5" x="0" y="46.5117">}</text><text fill="#33FF02" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="0" x="5" y="63"/><text fill="#33FF02" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="32" x="0" y="79.4883">User</text><text fill="#33FF02" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="0" x="5" y="95.9766"/><text fill="#FF0000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="94" x="5" y="95.9766">Syntax Error?</text></g></svg>
|
After Width: | Height: | Size: 1.4 KiB |
26
Structural/DataMapper/uml/uml.txt
Normal file
26
Structural/DataMapper/uml/uml.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
@startuml
|
||||
class User {
|
||||
protected $userId
|
||||
protected $username
|
||||
protected $email
|
||||
+__construct($id = null, $username = null, $email = null)
|
||||
+getUserId()
|
||||
+setUserID($userId)
|
||||
+getUsername()
|
||||
+setUsername($username)
|
||||
+getEmail()
|
||||
+setEmail($email)
|
||||
}
|
||||
|
||||
class UserMapper {
|
||||
protected $adapter
|
||||
+__construct(DBAL $dbLayer)
|
||||
+save(User $user)
|
||||
+findById($id)
|
||||
+findAll()
|
||||
+mapObject(array $row)
|
||||
}
|
||||
|
||||
User
|
||||
UserMapper
|
||||
@enduml
|
Reference in New Issue
Block a user