|
|
@ -12,12 +12,14 @@ class Team {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Team --> "- mainColor" Color
|
|
|
|
Team --> "- mainColor" Color
|
|
|
|
Team --> "- secondaryColor" Color
|
|
|
|
Team --> "- secondColor" Color
|
|
|
|
|
|
|
|
|
|
|
|
class Color {
|
|
|
|
class Color {
|
|
|
|
- value: int
|
|
|
|
- value: string
|
|
|
|
|
|
|
|
- __construct(value : string)
|
|
|
|
+ getValue(): int
|
|
|
|
+ getValue(): string
|
|
|
|
|
|
|
|
+ from(value: string): Color
|
|
|
|
|
|
|
|
+ tryFrom(value : string) : ?Color
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class TeamGateway{
|
|
|
|
class TeamGateway{
|
|
|
@ -31,15 +33,11 @@ TeamGateway *--"- con" Connexion
|
|
|
|
TeamGateway ..> Color
|
|
|
|
TeamGateway ..> Color
|
|
|
|
|
|
|
|
|
|
|
|
class TeamModel{
|
|
|
|
class TeamModel{
|
|
|
|
+ ERROR_INVALID_COLOR : int {readOnly}
|
|
|
|
|
|
|
|
+ ERROR_INVALID_NAME : int {readOnly}
|
|
|
|
|
|
|
|
+ ERROR_INVALID_PICTURE : int {readOnly}
|
|
|
|
|
|
|
|
+ ERROR_INVALID_SEARCH : int {readOnly}
|
|
|
|
|
|
|
|
+ ERROR_NO_DATA_FOUND : int {readOnly}
|
|
|
|
|
|
|
|
---
|
|
|
|
---
|
|
|
|
+ __construct(gateway : TeamGateway)
|
|
|
|
+ __construct(gateway : TeamGateway)
|
|
|
|
+ createTeam(name : string,picture : string, mainColorValue : int, secondColorValue : int, errors : array)
|
|
|
|
+ createTeam(name : string,picture : string, mainColorValue : int, secondColorValue : int, errors : array)
|
|
|
|
+ listByName(name : string ,errors : array) : ?array
|
|
|
|
+ listByName(name : string ,errors : array) : ?array
|
|
|
|
|
|
|
|
+ displayTeam(id : int): Team
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TeamModel *--"- gateway" TeamGateway
|
|
|
|
TeamModel *--"- gateway" TeamGateway
|
|
|
@ -50,8 +48,11 @@ class TeamController{
|
|
|
|
- twig : Environement
|
|
|
|
- twig : Environement
|
|
|
|
--
|
|
|
|
--
|
|
|
|
+ __construct( model : TeamModel, twig : Environement)
|
|
|
|
+ __construct( model : TeamModel, twig : Environement)
|
|
|
|
+ submitTeam(request : array)
|
|
|
|
+ displaySubmitTeam() : HttpResponse
|
|
|
|
+ listTeamByName(request : array)
|
|
|
|
+ submitTeam(request : array) : HttpResponse
|
|
|
|
|
|
|
|
+ displayListTeamByName(): HttpResponse
|
|
|
|
|
|
|
|
+ listTeamByName(request : array) : HttpResponse
|
|
|
|
|
|
|
|
+ displayTeam(id : int): HttpResponse
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TeamController *--"- model" TeamModel
|
|
|
|
TeamController *--"- model" TeamModel
|
|
|
@ -62,7 +63,6 @@ class Connexion{
|
|
|
|
+ __constructor(pdo : PDO)
|
|
|
|
+ __constructor(pdo : PDO)
|
|
|
|
+ exec(query : string, args : array)
|
|
|
|
+ exec(query : string, args : array)
|
|
|
|
+ fetch(query string, args array): array
|
|
|
|
+ fetch(query string, args array): array
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@enduml
|
|
|
|
@enduml
|