From 5de925155f11931c2913034b20277649b6d136e4 Mon Sep 17 00:00:00 2001 From: Rossetto Date: Wed, 15 Nov 2023 11:39:57 +0100 Subject: [PATCH 1/6] modification on parser to test --- fluxRSS/DAL/ArticleGateway.php | 9 +++++++++ fluxRSS/model/Parser.php | 21 +++++++++++++++++---- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/fluxRSS/DAL/ArticleGateway.php b/fluxRSS/DAL/ArticleGateway.php index 7818920..89e43ec 100755 --- a/fluxRSS/DAL/ArticleGateway.php +++ b/fluxRSS/DAL/ArticleGateway.php @@ -48,4 +48,13 @@ class ArticleGateway throw new Exception("PDO error"); } } + + public function removeAllArticleForParser(){ + try{ + $query = 'DELETE FROM Article;'; + $this->con->executeQuery($query); + }catch(\PDOException $p){ + throw new Exception("Data is not delete."); + } + } } \ No newline at end of file diff --git a/fluxRSS/model/Parser.php b/fluxRSS/model/Parser.php index a965433..287e26d 100755 --- a/fluxRSS/model/Parser.php +++ b/fluxRSS/model/Parser.php @@ -3,6 +3,7 @@ namespace model; use DAL\ArticleGateway; +use DAL\Connection; use DAL\FluxGateway; use DOMDocument; use Exception; @@ -62,13 +63,25 @@ class Parser /** * @throws Exception */ - public function addAllArticles(){ - $allFlux = $this->fluxGateway->findAllFlux(); + public function addAllArticles() + { + $this->articleGateway->removeAllArticleForParser(); + $allFlux = $this->fluxGateway->findAllFlux(); + var_dump($allFlux); $allArticles = $this->parseAll($allFlux); - + var_dump($allArticles); foreach ($allArticles as $article) { $this->articleGateway->addArticle($article); } + return $allArticles; } -} \ No newline at end of file + +} +$gwArt = new ArticleGateway(new Connection('mysql:host=londres.uca.local;dbname=dbrorossetto', 'rorossetto', 'tpphp')); +$gwFl = new FluxGateway(new Connection('mysql:host=londres.uca.local;dbname=dbrorossetto', 'rorossetto', 'tpphp')); +$pars = new Parser( $gwFl,$gwArt); +var_dump($pars->addAllArticles()); + + + From b0426ccc7619f9f17ed546ffc85d416356ac15f7 Mon Sep 17 00:00:00 2001 From: Rossetto Date: Wed, 15 Nov 2023 12:45:35 +0100 Subject: [PATCH 2/6] remove items in the directory --- Main.svg | 1 - testDB.php.txt | 8 -------- use case diagramm.mdj | 1 - 3 files changed, 10 deletions(-) delete mode 100644 Main.svg delete mode 100644 testDB.php.txt delete mode 100644 use case diagramm.mdj diff --git a/Main.svg b/Main.svg deleted file mode 100644 index 00e9d72..0000000 --- a/Main.svg +++ /dev/null @@ -1 +0,0 @@ -FluxArticleFluxGatewayArticleGatwayFluxModelArticleModelControleurValidatorConnectionAdminParser \ No newline at end of file diff --git a/testDB.php.txt b/testDB.php.txt deleted file mode 100644 index 8ecfed6..0000000 --- a/testDB.php.txt +++ /dev/null @@ -1,8 +0,0 @@ -https://perso.limos.fr/~sesalva/files/php/Tp2A/tp1/projets.html -parser add article to the bd -X article par page lors de recherche -admin peut ajouter/suppr/modif flux rss, modif nb d'article par page - -flux rss = fichier xml qui contient news -parser doit parser le flux rss pour créer un article -php inclut parser xml diff --git a/use case diagramm.mdj b/use case diagramm.mdj deleted file mode 100644 index 8e08235..0000000 --- a/use case diagramm.mdj +++ /dev/null @@ -1 +0,0 @@ -{"_type":"Project","_id":"AAAAAAFF+h6SjaM2Hec=","name":"Untitled","ownedElements":[{"_type":"UMLModel","_id":"AAAAAAFF+qBWK6M3Z8Y=","_parent":{"$ref":"AAAAAAFF+h6SjaM2Hec="},"name":"Model","ownedElements":[{"_type":"UMLClassDiagram","_id":"AAAAAAFF+qBtyKM79qY=","_parent":{"$ref":"AAAAAAFF+qBWK6M3Z8Y="},"name":"Main","defaultDiagram":true,"ownedViews":[{"_type":"UMLClassView","_id":"AAAAAAGLr4ofbOxmReQ=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr4ofbOxksOk="},"subViews":[{"_type":"UMLNameCompartmentView","_id":"AAAAAAGLr4ofbOxnEXE=","_parent":{"$ref":"AAAAAAGLr4ofbOxmReQ="},"model":{"$ref":"AAAAAAGLr4ofbOxksOk="},"subViews":[{"_type":"LabelView","_id":"AAAAAAGLr4ofbOxo7Ic=","_parent":{"$ref":"AAAAAAGLr4ofbOxnEXE="},"visible":false,"font":"Arial;13;0","left":208,"top":-352,"height":13},{"_type":"LabelView","_id":"AAAAAAGLr4ofbexpad0=","_parent":{"$ref":"AAAAAAGLr4ofbOxnEXE="},"font":"Arial;13;1","left":381,"top":111,"width":42.919921875,"height":13,"text":"Flux"},{"_type":"LabelView","_id":"AAAAAAGLr4ofbexqK8Y=","_parent":{"$ref":"AAAAAAGLr4ofbOxnEXE="},"visible":false,"font":"Arial;13;0","left":208,"top":-352,"width":73.67724609375,"height":13,"text":"(from Model)"},{"_type":"LabelView","_id":"AAAAAAGLr4ofbexrTbw=","_parent":{"$ref":"AAAAAAGLr4ofbOxnEXE="},"visible":false,"font":"Arial;13;0","left":208,"top":-352,"height":13,"horizontalAlignment":1}],"font":"Arial;13;0","left":376,"top":104,"width":52.919921875,"height":25,"stereotypeLabel":{"$ref":"AAAAAAGLr4ofbOxo7Ic="},"nameLabel":{"$ref":"AAAAAAGLr4ofbexpad0="},"namespaceLabel":{"$ref":"AAAAAAGLr4ofbexqK8Y="},"propertyLabel":{"$ref":"AAAAAAGLr4ofbexrTbw="}},{"_type":"UMLAttributeCompartmentView","_id":"AAAAAAGLr4ofbexsXL4=","_parent":{"$ref":"AAAAAAGLr4ofbOxmReQ="},"model":{"$ref":"AAAAAAGLr4ofbOxksOk="},"font":"Arial;13;0","left":376,"top":129,"width":52.919921875,"height":10},{"_type":"UMLOperationCompartmentView","_id":"AAAAAAGLr4ofbexthdY=","_parent":{"$ref":"AAAAAAGLr4ofbOxmReQ="},"model":{"$ref":"AAAAAAGLr4ofbOxksOk="},"font":"Arial;13;0","left":376,"top":139,"width":52.919921875,"height":10},{"_type":"UMLReceptionCompartmentView","_id":"AAAAAAGLr4ofbexuRSI=","_parent":{"$ref":"AAAAAAGLr4ofbOxmReQ="},"model":{"$ref":"AAAAAAGLr4ofbOxksOk="},"visible":false,"font":"Arial;13;0","left":104,"top":-176,"width":10,"height":10},{"_type":"UMLTemplateParameterCompartmentView","_id":"AAAAAAGLr4ofbexvlY0=","_parent":{"$ref":"AAAAAAGLr4ofbOxmReQ="},"model":{"$ref":"AAAAAAGLr4ofbOxksOk="},"visible":false,"font":"Arial;13;0","left":104,"top":-176,"width":10,"height":10}],"font":"Arial;13;0","containerChangeable":true,"left":376,"top":104,"width":51.919921875,"height":45,"nameCompartment":{"$ref":"AAAAAAGLr4ofbOxnEXE="},"attributeCompartment":{"$ref":"AAAAAAGLr4ofbexsXL4="},"operationCompartment":{"$ref":"AAAAAAGLr4ofbexthdY="},"receptionCompartment":{"$ref":"AAAAAAGLr4ofbexuRSI="},"templateParameterCompartment":{"$ref":"AAAAAAGLr4ofbexvlY0="}},{"_type":"UMLClassView","_id":"AAAAAAGLr4qOjeyQZgM=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr4qOjeyOp8g="},"subViews":[{"_type":"UMLNameCompartmentView","_id":"AAAAAAGLr4qOjeyRo7I=","_parent":{"$ref":"AAAAAAGLr4qOjeyQZgM="},"model":{"$ref":"AAAAAAGLr4qOjeyOp8g="},"subViews":[{"_type":"LabelView","_id":"AAAAAAGLr4qOjeySV18=","_parent":{"$ref":"AAAAAAGLr4qOjeyRo7I="},"visible":false,"font":"Arial;13;0","left":384,"top":208,"height":13},{"_type":"LabelView","_id":"AAAAAAGLr4qOjuyT3tQ=","_parent":{"$ref":"AAAAAAGLr4qOjeyRo7I="},"font":"Arial;13;1","left":349,"top":511,"width":42.919921875,"height":13,"text":"Article"},{"_type":"LabelView","_id":"AAAAAAGLr4qOjuyUpo0=","_parent":{"$ref":"AAAAAAGLr4qOjeyRo7I="},"visible":false,"font":"Arial;13;0","left":384,"top":208,"width":73.67724609375,"height":13,"text":"(from Model)"},{"_type":"LabelView","_id":"AAAAAAGLr4qOjuyVAb4=","_parent":{"$ref":"AAAAAAGLr4qOjeyRo7I="},"visible":false,"font":"Arial;13;0","left":384,"top":208,"height":13,"horizontalAlignment":1}],"font":"Arial;13;0","left":344,"top":504,"width":52.919921875,"height":25,"stereotypeLabel":{"$ref":"AAAAAAGLr4qOjeySV18="},"nameLabel":{"$ref":"AAAAAAGLr4qOjuyT3tQ="},"namespaceLabel":{"$ref":"AAAAAAGLr4qOjuyUpo0="},"propertyLabel":{"$ref":"AAAAAAGLr4qOjuyVAb4="}},{"_type":"UMLAttributeCompartmentView","_id":"AAAAAAGLr4qOjuyWqy0=","_parent":{"$ref":"AAAAAAGLr4qOjeyQZgM="},"model":{"$ref":"AAAAAAGLr4qOjeyOp8g="},"font":"Arial;13;0","left":344,"top":529,"width":52.919921875,"height":10},{"_type":"UMLOperationCompartmentView","_id":"AAAAAAGLr4qOjuyXm+4=","_parent":{"$ref":"AAAAAAGLr4qOjeyQZgM="},"model":{"$ref":"AAAAAAGLr4qOjeyOp8g="},"font":"Arial;13;0","left":344,"top":539,"width":52.919921875,"height":10},{"_type":"UMLReceptionCompartmentView","_id":"AAAAAAGLr4qOjuyY+is=","_parent":{"$ref":"AAAAAAGLr4qOjeyQZgM="},"model":{"$ref":"AAAAAAGLr4qOjeyOp8g="},"visible":false,"font":"Arial;13;0","left":192,"top":104,"width":10,"height":10},{"_type":"UMLTemplateParameterCompartmentView","_id":"AAAAAAGLr4qOjuyZTv4=","_parent":{"$ref":"AAAAAAGLr4qOjeyQZgM="},"model":{"$ref":"AAAAAAGLr4qOjeyOp8g="},"visible":false,"font":"Arial;13;0","left":192,"top":104,"width":10,"height":10}],"font":"Arial;13;0","containerChangeable":true,"left":344,"top":504,"width":51.919921875,"height":45,"nameCompartment":{"$ref":"AAAAAAGLr4qOjeyRo7I="},"attributeCompartment":{"$ref":"AAAAAAGLr4qOjuyWqy0="},"operationCompartment":{"$ref":"AAAAAAGLr4qOjuyXm+4="},"receptionCompartment":{"$ref":"AAAAAAGLr4qOjuyY+is="},"templateParameterCompartment":{"$ref":"AAAAAAGLr4qOjuyZTv4="}},{"_type":"UMLClassView","_id":"AAAAAAGLr4sA9ey+QQ0=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr4sA9Oy89r8="},"subViews":[{"_type":"UMLNameCompartmentView","_id":"AAAAAAGLr4sA9uy/1nQ=","_parent":{"$ref":"AAAAAAGLr4sA9ey+QQ0="},"model":{"$ref":"AAAAAAGLr4sA9Oy89r8="},"subViews":[{"_type":"LabelView","_id":"AAAAAAGLr4sA9uzAc4U=","_parent":{"$ref":"AAAAAAGLr4sA9uy/1nQ="},"visible":false,"font":"Arial;13;0","left":-624,"top":96,"height":13},{"_type":"LabelView","_id":"AAAAAAGLr4sA9uzBisk=","_parent":{"$ref":"AAAAAAGLr4sA9uy/1nQ="},"font":"Arial;13;1","left":157,"top":207,"width":81.1962890625,"height":13,"text":"FluxGateway"},{"_type":"LabelView","_id":"AAAAAAGLr4sA9uzCjqM=","_parent":{"$ref":"AAAAAAGLr4sA9uy/1nQ="},"visible":false,"font":"Arial;13;0","left":-624,"top":96,"width":73.67724609375,"height":13,"text":"(from Model)"},{"_type":"LabelView","_id":"AAAAAAGLr4sA9uzDGCM=","_parent":{"$ref":"AAAAAAGLr4sA9uy/1nQ="},"visible":false,"font":"Arial;13;0","left":-624,"top":96,"height":13,"horizontalAlignment":1}],"font":"Arial;13;0","left":152,"top":200,"width":91.1962890625,"height":25,"stereotypeLabel":{"$ref":"AAAAAAGLr4sA9uzAc4U="},"nameLabel":{"$ref":"AAAAAAGLr4sA9uzBisk="},"namespaceLabel":{"$ref":"AAAAAAGLr4sA9uzCjqM="},"propertyLabel":{"$ref":"AAAAAAGLr4sA9uzDGCM="}},{"_type":"UMLAttributeCompartmentView","_id":"AAAAAAGLr4sA9uzEqcU=","_parent":{"$ref":"AAAAAAGLr4sA9ey+QQ0="},"model":{"$ref":"AAAAAAGLr4sA9Oy89r8="},"font":"Arial;13;0","left":152,"top":225,"width":91.1962890625,"height":10},{"_type":"UMLOperationCompartmentView","_id":"AAAAAAGLr4sA9uzF6AU=","_parent":{"$ref":"AAAAAAGLr4sA9ey+QQ0="},"model":{"$ref":"AAAAAAGLr4sA9Oy89r8="},"font":"Arial;13;0","left":152,"top":235,"width":91.1962890625,"height":10},{"_type":"UMLReceptionCompartmentView","_id":"AAAAAAGLr4sA9uzGbC0=","_parent":{"$ref":"AAAAAAGLr4sA9ey+QQ0="},"model":{"$ref":"AAAAAAGLr4sA9Oy89r8="},"visible":false,"font":"Arial;13;0","left":-312,"top":48,"width":10,"height":10},{"_type":"UMLTemplateParameterCompartmentView","_id":"AAAAAAGLr4sA9uzHIfA=","_parent":{"$ref":"AAAAAAGLr4sA9ey+QQ0="},"model":{"$ref":"AAAAAAGLr4sA9Oy89r8="},"visible":false,"font":"Arial;13;0","left":-312,"top":48,"width":10,"height":10}],"font":"Arial;13;0","containerChangeable":true,"left":152,"top":200,"width":90.1962890625,"height":45,"nameCompartment":{"$ref":"AAAAAAGLr4sA9uy/1nQ="},"attributeCompartment":{"$ref":"AAAAAAGLr4sA9uzEqcU="},"operationCompartment":{"$ref":"AAAAAAGLr4sA9uzF6AU="},"receptionCompartment":{"$ref":"AAAAAAGLr4sA9uzGbC0="},"templateParameterCompartment":{"$ref":"AAAAAAGLr4sA9uzHIfA="}},{"_type":"UMLClassView","_id":"AAAAAAGLr4tHS+zpelA=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr4tHS+znCJg="},"subViews":[{"_type":"UMLNameCompartmentView","_id":"AAAAAAGLr4tHTOzqy1s=","_parent":{"$ref":"AAAAAAGLr4tHS+zpelA="},"model":{"$ref":"AAAAAAGLr4tHS+znCJg="},"subViews":[{"_type":"LabelView","_id":"AAAAAAGLr4tHTOzrDj8=","_parent":{"$ref":"AAAAAAGLr4tHTOzqy1s="},"visible":false,"font":"Arial;13;0","left":-384,"top":-32,"height":13},{"_type":"LabelView","_id":"AAAAAAGLr4tHTOzsG+8=","_parent":{"$ref":"AAAAAAGLr4tHTOzqy1s="},"font":"Arial;13;1","left":141,"top":431,"width":87.70263671875,"height":13,"text":"ArticleGatway"},{"_type":"LabelView","_id":"AAAAAAGLr4tHTOztuq4=","_parent":{"$ref":"AAAAAAGLr4tHTOzqy1s="},"visible":false,"font":"Arial;13;0","left":-384,"top":-32,"width":73.67724609375,"height":13,"text":"(from Model)"},{"_type":"LabelView","_id":"AAAAAAGLr4tHTOzuOJo=","_parent":{"$ref":"AAAAAAGLr4tHTOzqy1s="},"visible":false,"font":"Arial;13;0","left":-384,"top":-32,"height":13,"horizontalAlignment":1}],"font":"Arial;13;0","left":136,"top":424,"width":97.70263671875,"height":25,"stereotypeLabel":{"$ref":"AAAAAAGLr4tHTOzrDj8="},"nameLabel":{"$ref":"AAAAAAGLr4tHTOzsG+8="},"namespaceLabel":{"$ref":"AAAAAAGLr4tHTOztuq4="},"propertyLabel":{"$ref":"AAAAAAGLr4tHTOzuOJo="}},{"_type":"UMLAttributeCompartmentView","_id":"AAAAAAGLr4tHTOzvss4=","_parent":{"$ref":"AAAAAAGLr4tHS+zpelA="},"model":{"$ref":"AAAAAAGLr4tHS+znCJg="},"font":"Arial;13;0","left":136,"top":449,"width":97.70263671875,"height":10},{"_type":"UMLOperationCompartmentView","_id":"AAAAAAGLr4tHTOzw/2c=","_parent":{"$ref":"AAAAAAGLr4tHS+zpelA="},"model":{"$ref":"AAAAAAGLr4tHS+znCJg="},"font":"Arial;13;0","left":136,"top":459,"width":97.70263671875,"height":10},{"_type":"UMLReceptionCompartmentView","_id":"AAAAAAGLr4tHTOzxkrk=","_parent":{"$ref":"AAAAAAGLr4tHS+zpelA="},"model":{"$ref":"AAAAAAGLr4tHS+znCJg="},"visible":false,"font":"Arial;13;0","left":-192,"top":-16,"width":10,"height":10},{"_type":"UMLTemplateParameterCompartmentView","_id":"AAAAAAGLr4tHTOzykco=","_parent":{"$ref":"AAAAAAGLr4tHS+zpelA="},"model":{"$ref":"AAAAAAGLr4tHS+znCJg="},"visible":false,"font":"Arial;13;0","left":-192,"top":-16,"width":10,"height":10}],"font":"Arial;13;0","containerChangeable":true,"left":136,"top":424,"width":96.70263671875,"height":45,"nameCompartment":{"$ref":"AAAAAAGLr4tHTOzqy1s="},"attributeCompartment":{"$ref":"AAAAAAGLr4tHTOzvss4="},"operationCompartment":{"$ref":"AAAAAAGLr4tHTOzw/2c="},"receptionCompartment":{"$ref":"AAAAAAGLr4tHTOzxkrk="},"templateParameterCompartment":{"$ref":"AAAAAAGLr4tHTOzykco="}},{"_type":"UMLClassView","_id":"AAAAAAGLr4t9Fu0U6JQ=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr4t9Fe0SDHU="},"subViews":[{"_type":"UMLNameCompartmentView","_id":"AAAAAAGLr4t9Fu0VKg0=","_parent":{"$ref":"AAAAAAGLr4t9Fu0U6JQ="},"model":{"$ref":"AAAAAAGLr4t9Fe0SDHU="},"subViews":[{"_type":"LabelView","_id":"AAAAAAGLr4t9Fu0WQGc=","_parent":{"$ref":"AAAAAAGLr4t9Fu0VKg0="},"visible":false,"font":"Arial;13;0","left":-656,"top":16,"height":13},{"_type":"LabelView","_id":"AAAAAAGLr4t9Fu0XJEk=","_parent":{"$ref":"AAAAAAGLr4t9Fu0VKg0="},"font":"Arial;13;1","left":349,"top":207,"width":65.2763671875,"height":13,"text":"FluxModel"},{"_type":"LabelView","_id":"AAAAAAGLr4t9Fu0YMXA=","_parent":{"$ref":"AAAAAAGLr4t9Fu0VKg0="},"visible":false,"font":"Arial;13;0","left":-656,"top":16,"width":73.67724609375,"height":13,"text":"(from Model)"},{"_type":"LabelView","_id":"AAAAAAGLr4t9Fu0ZmDM=","_parent":{"$ref":"AAAAAAGLr4t9Fu0VKg0="},"visible":false,"font":"Arial;13;0","left":-656,"top":16,"height":13,"horizontalAlignment":1}],"font":"Arial;13;0","left":344,"top":200,"width":75.2763671875,"height":25,"stereotypeLabel":{"$ref":"AAAAAAGLr4t9Fu0WQGc="},"nameLabel":{"$ref":"AAAAAAGLr4t9Fu0XJEk="},"namespaceLabel":{"$ref":"AAAAAAGLr4t9Fu0YMXA="},"propertyLabel":{"$ref":"AAAAAAGLr4t9Fu0ZmDM="}},{"_type":"UMLAttributeCompartmentView","_id":"AAAAAAGLr4t9Fu0aqZ4=","_parent":{"$ref":"AAAAAAGLr4t9Fu0U6JQ="},"model":{"$ref":"AAAAAAGLr4t9Fe0SDHU="},"font":"Arial;13;0","left":344,"top":225,"width":75.2763671875,"height":10},{"_type":"UMLOperationCompartmentView","_id":"AAAAAAGLr4t9Fu0bKIw=","_parent":{"$ref":"AAAAAAGLr4t9Fu0U6JQ="},"model":{"$ref":"AAAAAAGLr4t9Fe0SDHU="},"font":"Arial;13;0","left":344,"top":235,"width":75.2763671875,"height":10},{"_type":"UMLReceptionCompartmentView","_id":"AAAAAAGLr4t9Fu0cGg0=","_parent":{"$ref":"AAAAAAGLr4t9Fu0U6JQ="},"model":{"$ref":"AAAAAAGLr4t9Fe0SDHU="},"visible":false,"font":"Arial;13;0","left":-328,"top":8,"width":10,"height":10},{"_type":"UMLTemplateParameterCompartmentView","_id":"AAAAAAGLr4t9Fu0dZuc=","_parent":{"$ref":"AAAAAAGLr4t9Fu0U6JQ="},"model":{"$ref":"AAAAAAGLr4t9Fe0SDHU="},"visible":false,"font":"Arial;13;0","left":-328,"top":8,"width":10,"height":10}],"font":"Arial;13;0","containerChangeable":true,"left":344,"top":200,"width":74.2763671875,"height":45,"nameCompartment":{"$ref":"AAAAAAGLr4t9Fu0VKg0="},"attributeCompartment":{"$ref":"AAAAAAGLr4t9Fu0aqZ4="},"operationCompartment":{"$ref":"AAAAAAGLr4t9Fu0bKIw="},"receptionCompartment":{"$ref":"AAAAAAGLr4t9Fu0cGg0="},"templateParameterCompartment":{"$ref":"AAAAAAGLr4t9Fu0dZuc="}},{"_type":"UMLClassView","_id":"AAAAAAGLr4u2wO0/BMQ=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr4u2wO09x0k="},"subViews":[{"_type":"UMLNameCompartmentView","_id":"AAAAAAGLr4u2wO1Ajb0=","_parent":{"$ref":"AAAAAAGLr4u2wO0/BMQ="},"model":{"$ref":"AAAAAAGLr4u2wO09x0k="},"subViews":[{"_type":"LabelView","_id":"AAAAAAGLr4u2we1BZIA=","_parent":{"$ref":"AAAAAAGLr4u2wO1Ajb0="},"visible":false,"font":"Arial;13;0","left":-608,"top":144,"height":13},{"_type":"LabelView","_id":"AAAAAAGLr4u2we1Ch7U=","_parent":{"$ref":"AAAAAAGLr4u2wO1Ajb0="},"font":"Arial;13;1","left":333,"top":423,"width":79.0126953125,"height":13,"text":"ArticleModel"},{"_type":"LabelView","_id":"AAAAAAGLr4u2we1DVWc=","_parent":{"$ref":"AAAAAAGLr4u2wO1Ajb0="},"visible":false,"font":"Arial;13;0","left":-608,"top":144,"width":73.67724609375,"height":13,"text":"(from Model)"},{"_type":"LabelView","_id":"AAAAAAGLr4u2we1EC7I=","_parent":{"$ref":"AAAAAAGLr4u2wO1Ajb0="},"visible":false,"font":"Arial;13;0","left":-608,"top":144,"height":13,"horizontalAlignment":1}],"font":"Arial;13;0","left":328,"top":416,"width":89.0126953125,"height":25,"stereotypeLabel":{"$ref":"AAAAAAGLr4u2we1BZIA="},"nameLabel":{"$ref":"AAAAAAGLr4u2we1Ch7U="},"namespaceLabel":{"$ref":"AAAAAAGLr4u2we1DVWc="},"propertyLabel":{"$ref":"AAAAAAGLr4u2we1EC7I="}},{"_type":"UMLAttributeCompartmentView","_id":"AAAAAAGLr4u2we1FDjs=","_parent":{"$ref":"AAAAAAGLr4u2wO0/BMQ="},"model":{"$ref":"AAAAAAGLr4u2wO09x0k="},"font":"Arial;13;0","left":328,"top":441,"width":89.0126953125,"height":10},{"_type":"UMLOperationCompartmentView","_id":"AAAAAAGLr4u2we1GOeQ=","_parent":{"$ref":"AAAAAAGLr4u2wO0/BMQ="},"model":{"$ref":"AAAAAAGLr4u2wO09x0k="},"font":"Arial;13;0","left":328,"top":451,"width":89.0126953125,"height":10},{"_type":"UMLReceptionCompartmentView","_id":"AAAAAAGLr4u2we1Hq9Q=","_parent":{"$ref":"AAAAAAGLr4u2wO0/BMQ="},"model":{"$ref":"AAAAAAGLr4u2wO09x0k="},"visible":false,"font":"Arial;13;0","left":-304,"top":72,"width":10,"height":10},{"_type":"UMLTemplateParameterCompartmentView","_id":"AAAAAAGLr4u2we1IQSw=","_parent":{"$ref":"AAAAAAGLr4u2wO0/BMQ="},"model":{"$ref":"AAAAAAGLr4u2wO09x0k="},"visible":false,"font":"Arial;13;0","left":-304,"top":72,"width":10,"height":10}],"font":"Arial;13;0","containerChangeable":true,"left":328,"top":416,"width":88.0126953125,"height":45,"nameCompartment":{"$ref":"AAAAAAGLr4u2wO1Ajb0="},"attributeCompartment":{"$ref":"AAAAAAGLr4u2we1FDjs="},"operationCompartment":{"$ref":"AAAAAAGLr4u2we1GOeQ="},"receptionCompartment":{"$ref":"AAAAAAGLr4u2we1Hq9Q="},"templateParameterCompartment":{"$ref":"AAAAAAGLr4u2we1IQSw="}},{"_type":"UMLClassView","_id":"AAAAAAGLr4w7e+1w0I8=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"subViews":[{"_type":"UMLNameCompartmentView","_id":"AAAAAAGLr4w7e+1x1J4=","_parent":{"$ref":"AAAAAAGLr4w7e+1w0I8="},"model":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"subViews":[{"_type":"LabelView","_id":"AAAAAAGLr4w7e+1yxNg=","_parent":{"$ref":"AAAAAAGLr4w7e+1x1J4="},"visible":false,"font":"Arial;13;0","left":432,"top":496,"height":13},{"_type":"LabelView","_id":"AAAAAAGLr4w7e+1zbkk=","_parent":{"$ref":"AAAAAAGLr4w7e+1x1J4="},"font":"Arial;13;1","left":573,"top":328,"width":67.44091796875,"height":13,"text":"Controleur"},{"_type":"LabelView","_id":"AAAAAAGLr4w7e+10o0Q=","_parent":{"$ref":"AAAAAAGLr4w7e+1x1J4="},"visible":false,"font":"Arial;13;0","left":432,"top":496,"width":73.67724609375,"height":13,"text":"(from Model)"},{"_type":"LabelView","_id":"AAAAAAGLr4w7e+11GwA=","_parent":{"$ref":"AAAAAAGLr4w7e+1x1J4="},"visible":false,"font":"Arial;13;0","left":432,"top":496,"height":13,"horizontalAlignment":1}],"font":"Arial;13;0","left":568,"top":321,"width":77.44091796875,"height":25,"stereotypeLabel":{"$ref":"AAAAAAGLr4w7e+1yxNg="},"nameLabel":{"$ref":"AAAAAAGLr4w7e+1zbkk="},"namespaceLabel":{"$ref":"AAAAAAGLr4w7e+10o0Q="},"propertyLabel":{"$ref":"AAAAAAGLr4w7e+11GwA="}},{"_type":"UMLAttributeCompartmentView","_id":"AAAAAAGLr4w7e+12qNs=","_parent":{"$ref":"AAAAAAGLr4w7e+1w0I8="},"model":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"font":"Arial;13;0","left":568,"top":346,"width":77.44091796875,"height":10},{"_type":"UMLOperationCompartmentView","_id":"AAAAAAGLr4w7e+13c7Y=","_parent":{"$ref":"AAAAAAGLr4w7e+1w0I8="},"model":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"font":"Arial;13;0","left":568,"top":356,"width":77.44091796875,"height":10},{"_type":"UMLReceptionCompartmentView","_id":"AAAAAAGLr4w7e+145ik=","_parent":{"$ref":"AAAAAAGLr4w7e+1w0I8="},"model":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"visible":false,"font":"Arial;13;0","left":216,"top":248,"width":10,"height":10},{"_type":"UMLTemplateParameterCompartmentView","_id":"AAAAAAGLr4w7fO154NM=","_parent":{"$ref":"AAAAAAGLr4w7e+1w0I8="},"model":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"visible":false,"font":"Arial;13;0","left":216,"top":248,"width":10,"height":10}],"font":"Arial;13;0","containerChangeable":true,"left":568,"top":321,"width":76.44091796875,"height":45,"nameCompartment":{"$ref":"AAAAAAGLr4w7e+1x1J4="},"attributeCompartment":{"$ref":"AAAAAAGLr4w7e+12qNs="},"operationCompartment":{"$ref":"AAAAAAGLr4w7e+13c7Y="},"receptionCompartment":{"$ref":"AAAAAAGLr4w7e+145ik="},"templateParameterCompartment":{"$ref":"AAAAAAGLr4w7fO154NM="}},{"_type":"UMLClassView","_id":"AAAAAAGLr411J+2bMLA=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr411J+2ZYOI="},"subViews":[{"_type":"UMLNameCompartmentView","_id":"AAAAAAGLr411J+2cO68=","_parent":{"$ref":"AAAAAAGLr411J+2bMLA="},"model":{"$ref":"AAAAAAGLr411J+2ZYOI="},"subViews":[{"_type":"LabelView","_id":"AAAAAAGLr411J+2dkI0=","_parent":{"$ref":"AAAAAAGLr411J+2cO68="},"visible":false,"font":"Arial;13;0","left":-288,"top":-112,"height":13},{"_type":"LabelView","_id":"AAAAAAGLr411J+2ebew=","_parent":{"$ref":"AAAAAAGLr411J+2cO68="},"font":"Arial;13;1","left":589,"top":431,"width":55.9072265625,"height":13,"text":"Validator"},{"_type":"LabelView","_id":"AAAAAAGLr411J+2foZw=","_parent":{"$ref":"AAAAAAGLr411J+2cO68="},"visible":false,"font":"Arial;13;0","left":-288,"top":-112,"width":73.67724609375,"height":13,"text":"(from Model)"},{"_type":"LabelView","_id":"AAAAAAGLr411J+2gzuo=","_parent":{"$ref":"AAAAAAGLr411J+2cO68="},"visible":false,"font":"Arial;13;0","left":-288,"top":-112,"height":13,"horizontalAlignment":1}],"font":"Arial;13;0","left":584,"top":424,"width":65.9072265625,"height":25,"stereotypeLabel":{"$ref":"AAAAAAGLr411J+2dkI0="},"nameLabel":{"$ref":"AAAAAAGLr411J+2ebew="},"namespaceLabel":{"$ref":"AAAAAAGLr411J+2foZw="},"propertyLabel":{"$ref":"AAAAAAGLr411J+2gzuo="}},{"_type":"UMLAttributeCompartmentView","_id":"AAAAAAGLr411J+2hFhA=","_parent":{"$ref":"AAAAAAGLr411J+2bMLA="},"model":{"$ref":"AAAAAAGLr411J+2ZYOI="},"font":"Arial;13;0","left":584,"top":449,"width":65.9072265625,"height":10},{"_type":"UMLOperationCompartmentView","_id":"AAAAAAGLr411KO2iids=","_parent":{"$ref":"AAAAAAGLr411J+2bMLA="},"model":{"$ref":"AAAAAAGLr411J+2ZYOI="},"font":"Arial;13;0","left":584,"top":459,"width":65.9072265625,"height":10},{"_type":"UMLReceptionCompartmentView","_id":"AAAAAAGLr411KO2jAKQ=","_parent":{"$ref":"AAAAAAGLr411J+2bMLA="},"model":{"$ref":"AAAAAAGLr411J+2ZYOI="},"visible":false,"font":"Arial;13;0","left":-144,"top":-56,"width":10,"height":10},{"_type":"UMLTemplateParameterCompartmentView","_id":"AAAAAAGLr411KO2ki0E=","_parent":{"$ref":"AAAAAAGLr411J+2bMLA="},"model":{"$ref":"AAAAAAGLr411J+2ZYOI="},"visible":false,"font":"Arial;13;0","left":-144,"top":-56,"width":10,"height":10}],"font":"Arial;13;0","containerChangeable":true,"left":584,"top":424,"width":64.9072265625,"height":45,"nameCompartment":{"$ref":"AAAAAAGLr411J+2cO68="},"attributeCompartment":{"$ref":"AAAAAAGLr411J+2hFhA="},"operationCompartment":{"$ref":"AAAAAAGLr411KO2iids="},"receptionCompartment":{"$ref":"AAAAAAGLr411KO2jAKQ="},"templateParameterCompartment":{"$ref":"AAAAAAGLr411KO2ki0E="}},{"_type":"UMLClassView","_id":"AAAAAAGLr42hUe3Gd5g=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr42hUe3EoLI="},"subViews":[{"_type":"UMLNameCompartmentView","_id":"AAAAAAGLr42hUe3Hgn0=","_parent":{"$ref":"AAAAAAGLr42hUe3Gd5g="},"model":{"$ref":"AAAAAAGLr42hUe3EoLI="},"subViews":[{"_type":"LabelView","_id":"AAAAAAGLr42hUu3IkRU=","_parent":{"$ref":"AAAAAAGLr42hUe3Hgn0="},"visible":false,"font":"Arial;13;0","left":-640,"top":-544,"height":13},{"_type":"LabelView","_id":"AAAAAAGLr42hUu3Jy68=","_parent":{"$ref":"AAAAAAGLr42hUe3Hgn0="},"font":"Arial;13;1","left":13,"top":319,"width":72.49365234375,"height":13,"text":"Connection"},{"_type":"LabelView","_id":"AAAAAAGLr42hUu3KHUg=","_parent":{"$ref":"AAAAAAGLr42hUe3Hgn0="},"visible":false,"font":"Arial;13;0","left":-640,"top":-544,"width":73.67724609375,"height":13,"text":"(from Model)"},{"_type":"LabelView","_id":"AAAAAAGLr42hUu3LwQU=","_parent":{"$ref":"AAAAAAGLr42hUe3Hgn0="},"visible":false,"font":"Arial;13;0","left":-640,"top":-544,"height":13,"horizontalAlignment":1}],"font":"Arial;13;0","left":8,"top":312,"width":82.49365234375,"height":25,"stereotypeLabel":{"$ref":"AAAAAAGLr42hUu3IkRU="},"nameLabel":{"$ref":"AAAAAAGLr42hUu3Jy68="},"namespaceLabel":{"$ref":"AAAAAAGLr42hUu3KHUg="},"propertyLabel":{"$ref":"AAAAAAGLr42hUu3LwQU="}},{"_type":"UMLAttributeCompartmentView","_id":"AAAAAAGLr42hUu3MzdM=","_parent":{"$ref":"AAAAAAGLr42hUe3Gd5g="},"model":{"$ref":"AAAAAAGLr42hUe3EoLI="},"font":"Arial;13;0","left":8,"top":337,"width":82.49365234375,"height":10},{"_type":"UMLOperationCompartmentView","_id":"AAAAAAGLr42hUu3NIww=","_parent":{"$ref":"AAAAAAGLr42hUe3Gd5g="},"model":{"$ref":"AAAAAAGLr42hUe3EoLI="},"font":"Arial;13;0","left":8,"top":347,"width":82.49365234375,"height":10},{"_type":"UMLReceptionCompartmentView","_id":"AAAAAAGLr42hUu3OEh4=","_parent":{"$ref":"AAAAAAGLr42hUe3Gd5g="},"model":{"$ref":"AAAAAAGLr42hUe3EoLI="},"visible":false,"font":"Arial;13;0","left":-320,"top":-272,"width":10,"height":10},{"_type":"UMLTemplateParameterCompartmentView","_id":"AAAAAAGLr42hUu3PGK8=","_parent":{"$ref":"AAAAAAGLr42hUe3Gd5g="},"model":{"$ref":"AAAAAAGLr42hUe3EoLI="},"visible":false,"font":"Arial;13;0","left":-320,"top":-272,"width":10,"height":10}],"font":"Arial;13;0","containerChangeable":true,"left":8,"top":312,"width":81.49365234375,"height":45,"nameCompartment":{"$ref":"AAAAAAGLr42hUe3Hgn0="},"attributeCompartment":{"$ref":"AAAAAAGLr42hUu3MzdM="},"operationCompartment":{"$ref":"AAAAAAGLr42hUu3NIww="},"receptionCompartment":{"$ref":"AAAAAAGLr42hUu3OEh4="},"templateParameterCompartment":{"$ref":"AAAAAAGLr42hUu3PGK8="}},{"_type":"UMLDependencyView","_id":"AAAAAAGLr44zyu34ZpE=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr44zye321Qo="},"subViews":[{"_type":"EdgeLabelView","_id":"AAAAAAGLr44zy+35pF0=","_parent":{"$ref":"AAAAAAGLr44zyu34ZpE="},"model":{"$ref":"AAAAAAGLr44zye321Qo="},"visible":false,"font":"Arial;13;0","left":376,"top":164,"height":13,"alpha":1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr44zyu34ZpE="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr44zy+36zj8=","_parent":{"$ref":"AAAAAAGLr44zyu34ZpE="},"model":{"$ref":"AAAAAAGLr44zye321Qo="},"visible":null,"font":"Arial;13;0","left":361,"top":161,"height":13,"alpha":1.5707963267948966,"distance":30,"hostEdge":{"$ref":"AAAAAAGLr44zyu34ZpE="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr44zy+37P6c=","_parent":{"$ref":"AAAAAAGLr44zyu34ZpE="},"model":{"$ref":"AAAAAAGLr44zye321Qo="},"visible":false,"font":"Arial;13;0","left":405,"top":171,"height":13,"alpha":-1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr44zyu34ZpE="},"edgePosition":1}],"font":"Arial;13;0","head":{"$ref":"AAAAAAGLr4ofbOxmReQ="},"tail":{"$ref":"AAAAAAGLr4t9Fu0U6JQ="},"lineStyle":1,"points":"386:199;396:150","showVisibility":true,"nameLabel":{"$ref":"AAAAAAGLr44zy+35pF0="},"stereotypeLabel":{"$ref":"AAAAAAGLr44zy+36zj8="},"propertyLabel":{"$ref":"AAAAAAGLr44zy+37P6c="}},{"_type":"UMLDependencyView","_id":"AAAAAAGLr45C1O4JWNI=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr45C1O4HDN8="},"subViews":[{"_type":"EdgeLabelView","_id":"AAAAAAGLr45C1O4Kn8k=","_parent":{"$ref":"AAAAAAGLr45C1O4JWNI="},"model":{"$ref":"AAAAAAGLr45C1O4HDN8="},"visible":false,"font":"Arial;13;0","left":384,"top":475,"height":13,"alpha":1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr45C1O4JWNI="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45C1e4L0lg=","_parent":{"$ref":"AAAAAAGLr45C1O4JWNI="},"model":{"$ref":"AAAAAAGLr45C1O4HDN8="},"visible":null,"font":"Arial;13;0","left":399,"top":475,"height":13,"alpha":1.5707963267948966,"distance":30,"hostEdge":{"$ref":"AAAAAAGLr45C1O4JWNI="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45C1e4MFO4=","_parent":{"$ref":"AAAAAAGLr45C1O4JWNI="},"model":{"$ref":"AAAAAAGLr45C1O4HDN8="},"visible":false,"font":"Arial;13;0","left":355,"top":476,"height":13,"alpha":-1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr45C1O4JWNI="},"edgePosition":1}],"font":"Arial;13;0","head":{"$ref":"AAAAAAGLr4qOjeyQZgM="},"tail":{"$ref":"AAAAAAGLr4u2wO0/BMQ="},"lineStyle":1,"points":"371:462;370:503","showVisibility":true,"nameLabel":{"$ref":"AAAAAAGLr45C1O4Kn8k="},"stereotypeLabel":{"$ref":"AAAAAAGLr45C1e4L0lg="},"propertyLabel":{"$ref":"AAAAAAGLr45C1e4MFO4="}},{"_type":"UMLAssociationView","_id":"AAAAAAGLr45Xb+4cWj0=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr45Xbu4YV/Q="},"subViews":[{"_type":"EdgeLabelView","_id":"AAAAAAGLr45Xb+4dUnU=","_parent":{"$ref":"AAAAAAGLr45Xb+4cWj0="},"model":{"$ref":"AAAAAAGLr45Xbu4YV/Q="},"visible":false,"font":"Arial;13;0","left":125,"top":372,"height":13,"alpha":1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr45Xb+4cWj0="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45XcO4eIwk=","_parent":{"$ref":"AAAAAAGLr45Xb+4cWj0="},"model":{"$ref":"AAAAAAGLr45Xbu4YV/Q="},"visible":null,"font":"Arial;13;0","left":135,"top":360,"height":13,"alpha":1.5707963267948966,"distance":30,"hostEdge":{"$ref":"AAAAAAGLr45Xb+4cWj0="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45XcO4fNxA=","_parent":{"$ref":"AAAAAAGLr45Xb+4cWj0="},"model":{"$ref":"AAAAAAGLr45Xbu4YV/Q="},"visible":false,"font":"Arial;13;0","left":106,"top":395,"height":13,"alpha":-1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr45Xb+4cWj0="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45XcO4gyEs=","_parent":{"$ref":"AAAAAAGLr45Xb+4cWj0="},"model":{"$ref":"AAAAAAGLr45Xb+4ZWAc="},"visible":false,"font":"Arial;13;0","left":106,"top":356,"height":13,"alpha":0.5235987755982988,"distance":30,"hostEdge":{"$ref":"AAAAAAGLr45Xb+4cWj0="},"edgePosition":2},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45XcO4hDhk=","_parent":{"$ref":"AAAAAAGLr45Xb+4cWj0="},"model":{"$ref":"AAAAAAGLr45Xb+4ZWAc="},"visible":false,"font":"Arial;13;0","left":116,"top":348,"height":13,"alpha":0.7853981633974483,"distance":40,"hostEdge":{"$ref":"AAAAAAGLr45Xb+4cWj0="},"edgePosition":2},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45XcO4ioQQ=","_parent":{"$ref":"AAAAAAGLr45Xb+4cWj0="},"model":{"$ref":"AAAAAAGLr45Xb+4ZWAc="},"visible":false,"font":"Arial;13;0","left":85,"top":375,"height":13,"alpha":-0.5235987755982988,"distance":25,"hostEdge":{"$ref":"AAAAAAGLr45Xb+4cWj0="},"edgePosition":2},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45XcO4jRi0=","_parent":{"$ref":"AAAAAAGLr45Xb+4cWj0="},"model":{"$ref":"AAAAAAGLr45Xb+4aK00="},"visible":false,"font":"Arial;13;0","left":145,"top":388,"height":13,"alpha":-0.5235987755982988,"distance":30,"hostEdge":{"$ref":"AAAAAAGLr45Xb+4cWj0="}},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45XcO4k//E=","_parent":{"$ref":"AAAAAAGLr45Xb+4cWj0="},"model":{"$ref":"AAAAAAGLr45Xb+4aK00="},"visible":false,"font":"Arial;13;0","left":152,"top":377,"height":13,"alpha":-0.7853981633974483,"distance":40,"hostEdge":{"$ref":"AAAAAAGLr45Xb+4cWj0="}},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45XcO4lGWI=","_parent":{"$ref":"AAAAAAGLr45Xb+4cWj0="},"model":{"$ref":"AAAAAAGLr45Xb+4aK00="},"visible":false,"font":"Arial;13;0","left":131,"top":412,"height":13,"alpha":0.5235987755982988,"distance":25,"hostEdge":{"$ref":"AAAAAAGLr45Xb+4cWj0="}},{"_type":"UMLQualifierCompartmentView","_id":"AAAAAAGLr45XcO4mxxM=","_parent":{"$ref":"AAAAAAGLr45Xb+4cWj0="},"model":{"$ref":"AAAAAAGLr45Xb+4ZWAc="},"visible":false,"font":"Arial;13;0","width":10,"height":10},{"_type":"UMLQualifierCompartmentView","_id":"AAAAAAGLr45XcO4n9Hs=","_parent":{"$ref":"AAAAAAGLr45Xb+4cWj0="},"model":{"$ref":"AAAAAAGLr45Xb+4aK00="},"visible":false,"font":"Arial;13;0","width":10,"height":10}],"font":"Arial;13;0","head":{"$ref":"AAAAAAGLr4tHS+zpelA="},"tail":{"$ref":"AAAAAAGLr42hUe3Gd5g="},"lineStyle":1,"points":"77:358;156:423","showVisibility":true,"nameLabel":{"$ref":"AAAAAAGLr45Xb+4dUnU="},"stereotypeLabel":{"$ref":"AAAAAAGLr45XcO4eIwk="},"propertyLabel":{"$ref":"AAAAAAGLr45XcO4fNxA="},"showEndOrder":"hide","tailRoleNameLabel":{"$ref":"AAAAAAGLr45XcO4gyEs="},"tailPropertyLabel":{"$ref":"AAAAAAGLr45XcO4hDhk="},"tailMultiplicityLabel":{"$ref":"AAAAAAGLr45XcO4ioQQ="},"headRoleNameLabel":{"$ref":"AAAAAAGLr45XcO4jRi0="},"headPropertyLabel":{"$ref":"AAAAAAGLr45XcO4k//E="},"headMultiplicityLabel":{"$ref":"AAAAAAGLr45XcO4lGWI="},"tailQualifiersCompartment":{"$ref":"AAAAAAGLr45XcO4mxxM="},"headQualifiersCompartment":{"$ref":"AAAAAAGLr45XcO4n9Hs="}},{"_type":"UMLAssociationView","_id":"AAAAAAGLr45mIO74jNM=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr45mIO70KSY="},"subViews":[{"_type":"EdgeLabelView","_id":"AAAAAAGLr45mIO75yg8=","_parent":{"$ref":"AAAAAAGLr45mIO74jNM="},"model":{"$ref":"AAAAAAGLr45mIO70KSY="},"visible":false,"font":"Arial;13;0","left":113,"top":259,"height":13,"alpha":1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr45mIO74jNM="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45mIe76e8Q=","_parent":{"$ref":"AAAAAAGLr45mIO74jNM="},"model":{"$ref":"AAAAAAGLr45mIO70KSY="},"visible":null,"font":"Arial;13;0","left":104,"top":247,"height":13,"alpha":1.5707963267948966,"distance":30,"hostEdge":{"$ref":"AAAAAAGLr45mIO74jNM="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45mIe77ps0=","_parent":{"$ref":"AAAAAAGLr45mIO74jNM="},"model":{"$ref":"AAAAAAGLr45mIO70KSY="},"visible":false,"font":"Arial;13;0","left":130,"top":284,"height":13,"alpha":-1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr45mIO74jNM="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45mIe78KVg=","_parent":{"$ref":"AAAAAAGLr45mIO74jNM="},"model":{"$ref":"AAAAAAGLr45mIO71ZqM="},"visible":false,"font":"Arial;13;0","left":90,"top":277,"height":13,"alpha":0.5235987755982988,"distance":30,"hostEdge":{"$ref":"AAAAAAGLr45mIO74jNM="},"edgePosition":2},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45mIe79Fjw=","_parent":{"$ref":"AAAAAAGLr45mIO74jNM="},"model":{"$ref":"AAAAAAGLr45mIO71ZqM="},"visible":false,"font":"Arial;13;0","left":84,"top":265,"height":13,"alpha":0.7853981633974483,"distance":40,"hostEdge":{"$ref":"AAAAAAGLr45mIO74jNM="},"edgePosition":2},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45mIe7+wgM=","_parent":{"$ref":"AAAAAAGLr45mIO74jNM="},"model":{"$ref":"AAAAAAGLr45mIO71ZqM="},"visible":false,"font":"Arial;13;0","left":103,"top":301,"height":13,"alpha":-0.5235987755982988,"distance":25,"hostEdge":{"$ref":"AAAAAAGLr45mIO74jNM="},"edgePosition":2},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45mIe7/iX4=","_parent":{"$ref":"AAAAAAGLr45mIO74jNM="},"model":{"$ref":"AAAAAAGLr45mIO72eIk="},"visible":false,"font":"Arial;13;0","left":135,"top":243,"height":13,"alpha":-0.5235987755982988,"distance":30,"hostEdge":{"$ref":"AAAAAAGLr45mIO74jNM="}},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45mIe8Atl8=","_parent":{"$ref":"AAAAAAGLr45mIO74jNM="},"model":{"$ref":"AAAAAAGLr45mIO72eIk="},"visible":false,"font":"Arial;13;0","left":125,"top":234,"height":13,"alpha":-0.7853981633974483,"distance":40,"hostEdge":{"$ref":"AAAAAAGLr45mIO74jNM="}},{"_type":"EdgeLabelView","_id":"AAAAAAGLr45mIe8Bvlo=","_parent":{"$ref":"AAAAAAGLr45mIO74jNM="},"model":{"$ref":"AAAAAAGLr45mIO72eIk="},"visible":false,"font":"Arial;13;0","left":155,"top":263,"height":13,"alpha":0.5235987755982988,"distance":25,"hostEdge":{"$ref":"AAAAAAGLr45mIO74jNM="}},{"_type":"UMLQualifierCompartmentView","_id":"AAAAAAGLr45mIe8CYfo=","_parent":{"$ref":"AAAAAAGLr45mIO74jNM="},"model":{"$ref":"AAAAAAGLr45mIO71ZqM="},"visible":false,"font":"Arial;13;0","width":10,"height":10},{"_type":"UMLQualifierCompartmentView","_id":"AAAAAAGLr45mIe8DBHE=","_parent":{"$ref":"AAAAAAGLr45mIO74jNM="},"model":{"$ref":"AAAAAAGLr45mIO72eIk="},"visible":false,"font":"Arial;13;0","width":10,"height":10}],"font":"Arial;13;0","head":{"$ref":"AAAAAAGLr4sA9ey+QQ0="},"tail":{"$ref":"AAAAAAGLr42hUe3Gd5g="},"lineStyle":1,"points":"79:311;165:246","showVisibility":true,"nameLabel":{"$ref":"AAAAAAGLr45mIO75yg8="},"stereotypeLabel":{"$ref":"AAAAAAGLr45mIe76e8Q="},"propertyLabel":{"$ref":"AAAAAAGLr45mIe77ps0="},"showEndOrder":"hide","tailRoleNameLabel":{"$ref":"AAAAAAGLr45mIe78KVg="},"tailPropertyLabel":{"$ref":"AAAAAAGLr45mIe79Fjw="},"tailMultiplicityLabel":{"$ref":"AAAAAAGLr45mIe7+wgM="},"headRoleNameLabel":{"$ref":"AAAAAAGLr45mIe7/iX4="},"headPropertyLabel":{"$ref":"AAAAAAGLr45mIe8Atl8="},"headMultiplicityLabel":{"$ref":"AAAAAAGLr45mIe8Bvlo="},"tailQualifiersCompartment":{"$ref":"AAAAAAGLr45mIe8CYfo="},"headQualifiersCompartment":{"$ref":"AAAAAAGLr45mIe8DBHE="}},{"_type":"UMLDependencyView","_id":"AAAAAAGLr475fftRd1Y=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr475fPtPm7M="},"subViews":[{"_type":"EdgeLabelView","_id":"AAAAAAGLr475fftSV/c=","_parent":{"$ref":"AAAAAAGLr475fftRd1Y="},"model":{"$ref":"AAAAAAGLr475fPtPm7M="},"visible":false,"font":"Arial;13;0","left":280,"top":450,"height":13,"alpha":1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr475fftRd1Y="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr475fvtTPQk=","_parent":{"$ref":"AAAAAAGLr475fftRd1Y="},"model":{"$ref":"AAAAAAGLr475fPtPm7M="},"visible":null,"font":"Arial;13;0","left":281,"top":465,"height":13,"alpha":1.5707963267948966,"distance":30,"hostEdge":{"$ref":"AAAAAAGLr475fftRd1Y="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr475fvtUWS4=","_parent":{"$ref":"AAAAAAGLr475fftRd1Y="},"model":{"$ref":"AAAAAAGLr475fPtPm7M="},"visible":false,"font":"Arial;13;0","left":279,"top":421,"height":13,"alpha":-1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr475fftRd1Y="},"edgePosition":1}],"font":"Arial;13;0","head":{"$ref":"AAAAAAGLr4tHS+zpelA="},"tail":{"$ref":"AAAAAAGLr4u2wO0/BMQ="},"lineStyle":1,"points":"327:440;234:444","showVisibility":true,"nameLabel":{"$ref":"AAAAAAGLr475fftSV/c="},"stereotypeLabel":{"$ref":"AAAAAAGLr475fvtTPQk="},"propertyLabel":{"$ref":"AAAAAAGLr475fvtUWS4="}},{"_type":"UMLDependencyView","_id":"AAAAAAGLr48idPw6MwU=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr48idPw4hzA="},"subViews":[{"_type":"EdgeLabelView","_id":"AAAAAAGLr48idPw7yvg=","_parent":{"$ref":"AAAAAAGLr48idPw6MwU="},"model":{"$ref":"AAAAAAGLr48idPw4hzA="},"visible":false,"font":"Arial;13;0","left":292,"top":231,"height":13,"alpha":1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr48idPw6MwU="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr48idPw8MrM=","_parent":{"$ref":"AAAAAAGLr48idPw6MwU="},"model":{"$ref":"AAAAAAGLr48idPw4hzA="},"visible":null,"font":"Arial;13;0","left":292,"top":246,"height":13,"alpha":1.5707963267948966,"distance":30,"hostEdge":{"$ref":"AAAAAAGLr48idPw6MwU="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr48idfw91t4=","_parent":{"$ref":"AAAAAAGLr48idPw6MwU="},"model":{"$ref":"AAAAAAGLr48idPw4hzA="},"visible":false,"font":"Arial;13;0","left":293,"top":201,"height":13,"alpha":-1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr48idPw6MwU="},"edgePosition":1}],"font":"Arial;13;0","head":{"$ref":"AAAAAAGLr4sA9ey+QQ0="},"tail":{"$ref":"AAAAAAGLr4t9Fu0U6JQ="},"lineStyle":1,"points":"343:222;243:222","showVisibility":true,"nameLabel":{"$ref":"AAAAAAGLr48idPw7yvg="},"stereotypeLabel":{"$ref":"AAAAAAGLr48idPw8MrM="},"propertyLabel":{"$ref":"AAAAAAGLr48idfw91t4="}},{"_type":"UMLDependencyView","_id":"AAAAAAGLr49RKP9AUcw=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr49RJ/8+xx4="},"subViews":[{"_type":"EdgeLabelView","_id":"AAAAAAGLr49RKP9BnH0=","_parent":{"$ref":"AAAAAAGLr49RKP9AUcw="},"model":{"$ref":"AAAAAAGLr49RJ/8+xx4="},"visible":false,"font":"Arial;13;0","left":486,"top":289,"height":13,"alpha":1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr49RKP9AUcw="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr49RKP9C5/w=","_parent":{"$ref":"AAAAAAGLr49RKP9AUcw="},"model":{"$ref":"AAAAAAGLr49RJ/8+xx4="},"visible":null,"font":"Arial;13;0","left":479,"top":302,"height":13,"alpha":1.5707963267948966,"distance":30,"hostEdge":{"$ref":"AAAAAAGLr49RKP9AUcw="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr49RKP9DU7w=","_parent":{"$ref":"AAAAAAGLr49RKP9AUcw="},"model":{"$ref":"AAAAAAGLr49RJ/8+xx4="},"visible":false,"font":"Arial;13;0","left":499,"top":262,"height":13,"alpha":-1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr49RKP9AUcw="},"edgePosition":1}],"font":"Arial;13;0","head":{"$ref":"AAAAAAGLr4t9Fu0U6JQ="},"tail":{"$ref":"AAAAAAGLr4w7e+1w0I8="},"lineStyle":1,"points":"567:322;419:243","showVisibility":true,"nameLabel":{"$ref":"AAAAAAGLr49RKP9BnH0="},"stereotypeLabel":{"$ref":"AAAAAAGLr49RKP9C5/w="},"propertyLabel":{"$ref":"AAAAAAGLr49RKP9DU7w="}},{"_type":"UMLDependencyView","_id":"AAAAAAGLr49gEQCbJ30=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr49gEQCZ4Gc="},"subViews":[{"_type":"EdgeLabelView","_id":"AAAAAAGLr49gEQCccrw=","_parent":{"$ref":"AAAAAAGLr49gEQCbJ30="},"model":{"$ref":"AAAAAAGLr49gEQCZ4Gc="},"visible":false,"font":"Arial;13;0","left":497,"top":396,"height":13,"alpha":1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr49gEQCbJ30="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr49gEQCdObs=","_parent":{"$ref":"AAAAAAGLr49gEQCbJ30="},"model":{"$ref":"AAAAAAGLr49gEQCZ4Gc="},"visible":null,"font":"Arial;13;0","left":503,"top":410,"height":13,"alpha":1.5707963267948966,"distance":30,"hostEdge":{"$ref":"AAAAAAGLr49gEQCbJ30="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr49gEQCeA0k=","_parent":{"$ref":"AAAAAAGLr49gEQCbJ30="},"model":{"$ref":"AAAAAAGLr49gEQCZ4Gc="},"visible":false,"font":"Arial;13;0","left":486,"top":369,"height":13,"alpha":-1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr49gEQCbJ30="},"edgePosition":1}],"font":"Arial;13;0","head":{"$ref":"AAAAAAGLr4u2wO0/BMQ="},"tail":{"$ref":"AAAAAAGLr4w7e+1w0I8="},"lineStyle":1,"points":"567:359;417:420","showVisibility":true,"nameLabel":{"$ref":"AAAAAAGLr49gEQCccrw="},"stereotypeLabel":{"$ref":"AAAAAAGLr49gEQCdObs="},"propertyLabel":{"$ref":"AAAAAAGLr49gEQCeA0k="}},{"_type":"UMLDependencyView","_id":"AAAAAAGLr4+L0AKZ8Rg=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr4+LzwKXXhM="},"subViews":[{"_type":"EdgeLabelView","_id":"AAAAAAGLr4+L0AKa5oI=","_parent":{"$ref":"AAAAAAGLr4+L0AKZ8Rg="},"model":{"$ref":"AAAAAAGLr4+LzwKXXhM="},"visible":false,"font":"Arial;13;0","left":625,"top":387,"height":13,"alpha":1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr4+L0AKZ8Rg="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr4+L0AKb/9E=","_parent":{"$ref":"AAAAAAGLr4+L0AKZ8Rg="},"model":{"$ref":"AAAAAAGLr4+LzwKXXhM="},"visible":null,"font":"Arial;13;0","left":640,"top":385,"height":13,"alpha":1.5707963267948966,"distance":30,"hostEdge":{"$ref":"AAAAAAGLr4+L0AKZ8Rg="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr4+L0AKcFfw=","_parent":{"$ref":"AAAAAAGLr4+L0AKZ8Rg="},"model":{"$ref":"AAAAAAGLr4+LzwKXXhM="},"visible":false,"font":"Arial;13;0","left":596,"top":390,"height":13,"alpha":-1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr4+L0AKZ8Rg="},"edgePosition":1}],"font":"Arial;13;0","head":{"$ref":"AAAAAAGLr411J+2bMLA="},"tail":{"$ref":"AAAAAAGLr4w7e+1w0I8="},"lineStyle":1,"points":"608:367;614:423","showVisibility":true,"nameLabel":{"$ref":"AAAAAAGLr4+L0AKa5oI="},"stereotypeLabel":{"$ref":"AAAAAAGLr4+L0AKb/9E="},"propertyLabel":{"$ref":"AAAAAAGLr4+L0AKcFfw="}},{"_type":"UMLClassView","_id":"AAAAAAGLr5bYBRZmUIU=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr5bYBBZkCMI="},"subViews":[{"_type":"UMLNameCompartmentView","_id":"AAAAAAGLr5bYBRZnDXs=","_parent":{"$ref":"AAAAAAGLr5bYBRZmUIU="},"model":{"$ref":"AAAAAAGLr5bYBBZkCMI="},"subViews":[{"_type":"LabelView","_id":"AAAAAAGLr5bYBRZoL6k=","_parent":{"$ref":"AAAAAAGLr5bYBRZnDXs="},"visible":false,"font":"Arial;13;0","left":-128,"top":80,"height":13},{"_type":"LabelView","_id":"AAAAAAGLr5bYBRZp5Zw=","_parent":{"$ref":"AAAAAAGLr5bYBRZnDXs="},"font":"Arial;13;1","left":677,"top":255,"width":42.919921875,"height":13,"text":"Admin"},{"_type":"LabelView","_id":"AAAAAAGLr5bYBRZqerE=","_parent":{"$ref":"AAAAAAGLr5bYBRZnDXs="},"visible":false,"font":"Arial;13;0","left":-128,"top":80,"width":73.67724609375,"height":13,"text":"(from Model)"},{"_type":"LabelView","_id":"AAAAAAGLr5bYBRZrRdw=","_parent":{"$ref":"AAAAAAGLr5bYBRZnDXs="},"visible":false,"font":"Arial;13;0","left":-128,"top":80,"height":13,"horizontalAlignment":1}],"font":"Arial;13;0","left":672,"top":248,"width":52.919921875,"height":25,"stereotypeLabel":{"$ref":"AAAAAAGLr5bYBRZoL6k="},"nameLabel":{"$ref":"AAAAAAGLr5bYBRZp5Zw="},"namespaceLabel":{"$ref":"AAAAAAGLr5bYBRZqerE="},"propertyLabel":{"$ref":"AAAAAAGLr5bYBRZrRdw="}},{"_type":"UMLAttributeCompartmentView","_id":"AAAAAAGLr5bYBRZsx84=","_parent":{"$ref":"AAAAAAGLr5bYBRZmUIU="},"model":{"$ref":"AAAAAAGLr5bYBBZkCMI="},"font":"Arial;13;0","left":672,"top":273,"width":52.919921875,"height":10},{"_type":"UMLOperationCompartmentView","_id":"AAAAAAGLr5bYBRZtCp0=","_parent":{"$ref":"AAAAAAGLr5bYBRZmUIU="},"model":{"$ref":"AAAAAAGLr5bYBBZkCMI="},"font":"Arial;13;0","left":672,"top":283,"width":52.919921875,"height":10},{"_type":"UMLReceptionCompartmentView","_id":"AAAAAAGLr5bYBRZuI6Q=","_parent":{"$ref":"AAAAAAGLr5bYBRZmUIU="},"model":{"$ref":"AAAAAAGLr5bYBBZkCMI="},"visible":false,"font":"Arial;13;0","left":-64,"top":40,"width":10,"height":10},{"_type":"UMLTemplateParameterCompartmentView","_id":"AAAAAAGLr5bYBRZvEwA=","_parent":{"$ref":"AAAAAAGLr5bYBRZmUIU="},"model":{"$ref":"AAAAAAGLr5bYBBZkCMI="},"visible":false,"font":"Arial;13;0","left":-64,"top":40,"width":10,"height":10}],"font":"Arial;13;0","containerChangeable":true,"left":672,"top":248,"width":51.919921875,"height":45,"nameCompartment":{"$ref":"AAAAAAGLr5bYBRZnDXs="},"attributeCompartment":{"$ref":"AAAAAAGLr5bYBRZsx84="},"operationCompartment":{"$ref":"AAAAAAGLr5bYBRZtCp0="},"receptionCompartment":{"$ref":"AAAAAAGLr5bYBRZuI6Q="},"templateParameterCompartment":{"$ref":"AAAAAAGLr5bYBRZvEwA="}},{"_type":"UMLClassView","_id":"AAAAAAGLr5nyTBnAzJE=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr5nyTBm+3eU="},"subViews":[{"_type":"UMLNameCompartmentView","_id":"AAAAAAGLr5nyTBnBMhY=","_parent":{"$ref":"AAAAAAGLr5nyTBnAzJE="},"model":{"$ref":"AAAAAAGLr5nyTBm+3eU="},"subViews":[{"_type":"LabelView","_id":"AAAAAAGLr5nyTRnCHrc=","_parent":{"$ref":"AAAAAAGLr5nyTBnBMhY="},"visible":false,"font":"Arial;13;0","height":13},{"_type":"LabelView","_id":"AAAAAAGLr5nyTRnD/wc=","_parent":{"$ref":"AAAAAAGLr5nyTBnBMhY="},"font":"Arial;13;1","left":357,"top":327,"width":42.919921875,"height":13,"text":"Parser"},{"_type":"LabelView","_id":"AAAAAAGLr5nyTRnEREI=","_parent":{"$ref":"AAAAAAGLr5nyTBnBMhY="},"visible":false,"font":"Arial;13;0","width":73.67724609375,"height":13,"text":"(from Model)"},{"_type":"LabelView","_id":"AAAAAAGLr5nyTRnFLgs=","_parent":{"$ref":"AAAAAAGLr5nyTBnBMhY="},"visible":false,"font":"Arial;13;0","height":13,"horizontalAlignment":1}],"font":"Arial;13;0","left":352,"top":320,"width":52.919921875,"height":25,"stereotypeLabel":{"$ref":"AAAAAAGLr5nyTRnCHrc="},"nameLabel":{"$ref":"AAAAAAGLr5nyTRnD/wc="},"namespaceLabel":{"$ref":"AAAAAAGLr5nyTRnEREI="},"propertyLabel":{"$ref":"AAAAAAGLr5nyTRnFLgs="}},{"_type":"UMLAttributeCompartmentView","_id":"AAAAAAGLr5nyTRnGx8k=","_parent":{"$ref":"AAAAAAGLr5nyTBnAzJE="},"model":{"$ref":"AAAAAAGLr5nyTBm+3eU="},"font":"Arial;13;0","left":352,"top":345,"width":52.919921875,"height":10},{"_type":"UMLOperationCompartmentView","_id":"AAAAAAGLr5nyTRnH01Q=","_parent":{"$ref":"AAAAAAGLr5nyTBnAzJE="},"model":{"$ref":"AAAAAAGLr5nyTBm+3eU="},"font":"Arial;13;0","left":352,"top":355,"width":52.919921875,"height":10},{"_type":"UMLReceptionCompartmentView","_id":"AAAAAAGLr5nyTRnIfLw=","_parent":{"$ref":"AAAAAAGLr5nyTBnAzJE="},"model":{"$ref":"AAAAAAGLr5nyTBm+3eU="},"visible":false,"font":"Arial;13;0","width":10,"height":10},{"_type":"UMLTemplateParameterCompartmentView","_id":"AAAAAAGLr5nyTRnJplY=","_parent":{"$ref":"AAAAAAGLr5nyTBnAzJE="},"model":{"$ref":"AAAAAAGLr5nyTBm+3eU="},"visible":false,"font":"Arial;13;0","width":10,"height":10}],"font":"Arial;13;0","containerChangeable":true,"left":352,"top":320,"width":51.919921875,"height":45,"nameCompartment":{"$ref":"AAAAAAGLr5nyTBnBMhY="},"attributeCompartment":{"$ref":"AAAAAAGLr5nyTRnGx8k="},"operationCompartment":{"$ref":"AAAAAAGLr5nyTRnH01Q="},"receptionCompartment":{"$ref":"AAAAAAGLr5nyTRnIfLw="},"templateParameterCompartment":{"$ref":"AAAAAAGLr5nyTRnJplY="}},{"_type":"UMLDependencyView","_id":"AAAAAAGLr5oSOBq2Fh8=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr5oSNxq0sAE="},"subViews":[{"_type":"EdgeLabelView","_id":"AAAAAAGLr5oSOBq3uyM=","_parent":{"$ref":"AAAAAAGLr5oSOBq2Fh8="},"model":{"$ref":"AAAAAAGLr5oSNxq0sAE="},"visible":false,"font":"Arial;13;0","left":364,"top":275,"height":13,"alpha":1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr5oSOBq2Fh8="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr5oSOBq4z/I=","_parent":{"$ref":"AAAAAAGLr5oSOBq2Fh8="},"model":{"$ref":"AAAAAAGLr5oSNxq0sAE="},"visible":null,"font":"Arial;13;0","left":349,"top":275,"height":13,"alpha":1.5707963267948966,"distance":30,"hostEdge":{"$ref":"AAAAAAGLr5oSOBq2Fh8="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr5oSOBq5bBY=","_parent":{"$ref":"AAAAAAGLr5oSOBq2Fh8="},"model":{"$ref":"AAAAAAGLr5oSNxq0sAE="},"visible":false,"font":"Arial;13;0","left":393,"top":276,"height":13,"alpha":-1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr5oSOBq2Fh8="},"edgePosition":1}],"font":"Arial;13;0","head":{"$ref":"AAAAAAGLr4t9Fu0U6JQ="},"tail":{"$ref":"AAAAAAGLr5nyTBnAzJE="},"lineStyle":1,"points":"378:319;380:246","showVisibility":true,"nameLabel":{"$ref":"AAAAAAGLr5oSOBq3uyM="},"stereotypeLabel":{"$ref":"AAAAAAGLr5oSOBq4z/I="},"propertyLabel":{"$ref":"AAAAAAGLr5oSOBq5bBY="}},{"_type":"UMLDependencyView","_id":"AAAAAAGLr5oflxuBRew=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr5oflht/qLU="},"subViews":[{"_type":"EdgeLabelView","_id":"AAAAAAGLr5oflxuC2fU=","_parent":{"$ref":"AAAAAAGLr5oflxuBRew="},"model":{"$ref":"AAAAAAGLr5oflht/qLU="},"visible":false,"font":"Arial;13;0","left":388,"top":384,"height":13,"alpha":1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr5oflxuBRew="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr5oflxuD8xw=","_parent":{"$ref":"AAAAAAGLr5oflxuBRew="},"model":{"$ref":"AAAAAAGLr5oflht/qLU="},"visible":null,"font":"Arial;13;0","left":403,"top":385,"height":13,"alpha":1.5707963267948966,"distance":30,"hostEdge":{"$ref":"AAAAAAGLr5oflxuBRew="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr5oflxuE6so=","_parent":{"$ref":"AAAAAAGLr5oflxuBRew="},"model":{"$ref":"AAAAAAGLr5oflht/qLU="},"visible":false,"font":"Arial;13;0","left":359,"top":383,"height":13,"alpha":-1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr5oflxuBRew="},"edgePosition":1}],"font":"Arial;13;0","head":{"$ref":"AAAAAAGLr4u2wO0/BMQ="},"tail":{"$ref":"AAAAAAGLr5nyTBnAzJE="},"lineStyle":1,"points":"376:366;373:415","showVisibility":true,"nameLabel":{"$ref":"AAAAAAGLr5oflxuC2fU="},"stereotypeLabel":{"$ref":"AAAAAAGLr5oflxuD8xw="},"propertyLabel":{"$ref":"AAAAAAGLr5oflxuE6so="}},{"_type":"UMLDependencyView","_id":"AAAAAAGLr7/Tgh5LDps=","_parent":{"$ref":"AAAAAAFF+qBtyKM79qY="},"model":{"$ref":"AAAAAAGLr7/TgR5J+DQ="},"subViews":[{"_type":"EdgeLabelView","_id":"AAAAAAGLr7/Tgh5MlqQ=","_parent":{"$ref":"AAAAAAGLr7/Tgh5LDps="},"model":{"$ref":"AAAAAAGLr7/TgR5J+DQ="},"visible":false,"font":"Arial;13;0","left":643,"top":287,"height":13,"alpha":1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr7/Tgh5LDps="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr7/Tgh5NTY4=","_parent":{"$ref":"AAAAAAGLr7/Tgh5LDps="},"model":{"$ref":"AAAAAAGLr7/TgR5J+DQ="},"visible":null,"font":"Arial;13;0","left":634,"top":275,"height":13,"alpha":1.5707963267948966,"distance":30,"hostEdge":{"$ref":"AAAAAAGLr7/Tgh5LDps="},"edgePosition":1},{"_type":"EdgeLabelView","_id":"AAAAAAGLr7/Tgh5Oeq0=","_parent":{"$ref":"AAAAAAGLr7/Tgh5LDps="},"model":{"$ref":"AAAAAAGLr7/TgR5J+DQ="},"visible":false,"font":"Arial;13;0","left":662,"top":310,"height":13,"alpha":-1.5707963267948966,"distance":15,"hostEdge":{"$ref":"AAAAAAGLr7/Tgh5LDps="},"edgePosition":1}],"font":"Arial;13;0","head":{"$ref":"AAAAAAGLr5bYBRZmUIU="},"tail":{"$ref":"AAAAAAGLr4w7e+1w0I8="},"lineStyle":1,"points":"635:320;671:291","showVisibility":true,"nameLabel":{"$ref":"AAAAAAGLr7/Tgh5MlqQ="},"stereotypeLabel":{"$ref":"AAAAAAGLr7/Tgh5NTY4="},"propertyLabel":{"$ref":"AAAAAAGLr7/Tgh5Oeq0="}}]},{"_type":"UMLClass","_id":"AAAAAAGLr4na8+w5ld8=","_parent":{"$ref":"AAAAAAFF+qBWK6M3Z8Y="},"name":"Admin"},{"_type":"UMLClass","_id":"AAAAAAGLr4ofbOxksOk=","_parent":{"$ref":"AAAAAAFF+qBWK6M3Z8Y="},"name":"Flux"},{"_type":"UMLClass","_id":"AAAAAAGLr4qOjeyOp8g=","_parent":{"$ref":"AAAAAAFF+qBWK6M3Z8Y="},"name":"Article"},{"_type":"UMLClass","_id":"AAAAAAGLr4sA9Oy89r8=","_parent":{"$ref":"AAAAAAFF+qBWK6M3Z8Y="},"name":"FluxGateway"},{"_type":"UMLClass","_id":"AAAAAAGLr4tHS+znCJg=","_parent":{"$ref":"AAAAAAFF+qBWK6M3Z8Y="},"name":"ArticleGatway"},{"_type":"UMLClass","_id":"AAAAAAGLr4t9Fe0SDHU=","_parent":{"$ref":"AAAAAAFF+qBWK6M3Z8Y="},"name":"FluxModel","ownedElements":[{"_type":"UMLDependency","_id":"AAAAAAGLr44zye321Qo=","_parent":{"$ref":"AAAAAAGLr4t9Fe0SDHU="},"source":{"$ref":"AAAAAAGLr4t9Fe0SDHU="},"target":{"$ref":"AAAAAAGLr4ofbOxksOk="}},{"_type":"UMLDependency","_id":"AAAAAAGLr48idPw4hzA=","_parent":{"$ref":"AAAAAAGLr4t9Fe0SDHU="},"source":{"$ref":"AAAAAAGLr4t9Fe0SDHU="},"target":{"$ref":"AAAAAAGLr4sA9Oy89r8="}},{"_type":"UMLAssociation","_id":"AAAAAAGLr5d3DReWANE=","_parent":{"$ref":"AAAAAAGLr4t9Fe0SDHU="},"name":"flux","end1":{"_type":"UMLAssociationEnd","_id":"AAAAAAGLr5d3DReX81Y=","_parent":{"$ref":"AAAAAAGLr5d3DReWANE="},"reference":{"$ref":"AAAAAAGLr4t9Fe0SDHU="}},"end2":{"_type":"UMLAssociationEnd","_id":"AAAAAAGLr5d3DReY118=","_parent":{"$ref":"AAAAAAGLr5d3DReWANE="},"reference":{"$ref":"AAAAAAGLr4ofbOxksOk="},"navigable":"navigable"}}]},{"_type":"UMLClass","_id":"AAAAAAGLr4u2wO09x0k=","_parent":{"$ref":"AAAAAAFF+qBWK6M3Z8Y="},"name":"ArticleModel","ownedElements":[{"_type":"UMLDependency","_id":"AAAAAAGLr45C1O4HDN8=","_parent":{"$ref":"AAAAAAGLr4u2wO09x0k="},"source":{"$ref":"AAAAAAGLr4u2wO09x0k="},"target":{"$ref":"AAAAAAGLr4qOjeyOp8g="}},{"_type":"UMLDependency","_id":"AAAAAAGLr475fPtPm7M=","_parent":{"$ref":"AAAAAAGLr4u2wO09x0k="},"source":{"$ref":"AAAAAAGLr4u2wO09x0k="},"target":{"$ref":"AAAAAAGLr4tHS+znCJg="}}]},{"_type":"UMLClass","_id":"AAAAAAGLr4w7eu1u8Gg=","_parent":{"$ref":"AAAAAAFF+qBWK6M3Z8Y="},"name":"Controleur","ownedElements":[{"_type":"UMLDependency","_id":"AAAAAAGLr49RJ/8+xx4=","_parent":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"source":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"target":{"$ref":"AAAAAAGLr4t9Fe0SDHU="}},{"_type":"UMLDependency","_id":"AAAAAAGLr49gEQCZ4Gc=","_parent":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"source":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"target":{"$ref":"AAAAAAGLr4u2wO09x0k="}},{"_type":"UMLDependency","_id":"AAAAAAGLr4+LzwKXXhM=","_parent":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"source":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"target":{"$ref":"AAAAAAGLr411J+2ZYOI="}},{"_type":"UMLDependency","_id":"AAAAAAGLr5FRZhGCMEI=","_parent":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"source":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"target":{"$ref":"AAAAAAGLr4na8+w5ld8="}},{"_type":"UMLDependency","_id":"AAAAAAGLr5qtfxyw80U=","_parent":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"source":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"target":{"$ref":"AAAAAAGLr5nyTBm+3eU="}},{"_type":"UMLDependency","_id":"AAAAAAGLr7/TgR5J+DQ=","_parent":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"source":{"$ref":"AAAAAAGLr4w7eu1u8Gg="},"target":{"$ref":"AAAAAAGLr5bYBBZkCMI="}}]},{"_type":"UMLClass","_id":"AAAAAAGLr411J+2ZYOI=","_parent":{"$ref":"AAAAAAFF+qBWK6M3Z8Y="},"name":"Validator"},{"_type":"UMLClass","_id":"AAAAAAGLr42hUe3EoLI=","_parent":{"$ref":"AAAAAAFF+qBWK6M3Z8Y="},"name":"Connection","ownedElements":[{"_type":"UMLAssociation","_id":"AAAAAAGLr45Xbu4YV/Q=","_parent":{"$ref":"AAAAAAGLr42hUe3EoLI="},"end1":{"_type":"UMLAssociationEnd","_id":"AAAAAAGLr45Xb+4ZWAc=","_parent":{"$ref":"AAAAAAGLr45Xbu4YV/Q="},"reference":{"$ref":"AAAAAAGLr42hUe3EoLI="}},"end2":{"_type":"UMLAssociationEnd","_id":"AAAAAAGLr45Xb+4aK00=","_parent":{"$ref":"AAAAAAGLr45Xbu4YV/Q="},"reference":{"$ref":"AAAAAAGLr4tHS+znCJg="},"aggregation":"composite"}},{"_type":"UMLAssociation","_id":"AAAAAAGLr45mIO70KSY=","_parent":{"$ref":"AAAAAAGLr42hUe3EoLI="},"end1":{"_type":"UMLAssociationEnd","_id":"AAAAAAGLr45mIO71ZqM=","_parent":{"$ref":"AAAAAAGLr45mIO70KSY="},"reference":{"$ref":"AAAAAAGLr42hUe3EoLI="}},"end2":{"_type":"UMLAssociationEnd","_id":"AAAAAAGLr45mIO72eIk=","_parent":{"$ref":"AAAAAAGLr45mIO70KSY="},"reference":{"$ref":"AAAAAAGLr4sA9Oy89r8="},"aggregation":"composite"}}]},{"_type":"UMLClass","_id":"AAAAAAGLr5bYBBZkCMI=","_parent":{"$ref":"AAAAAAFF+qBWK6M3Z8Y="},"name":"Admin"},{"_type":"UMLClass","_id":"AAAAAAGLr5nyTBm+3eU=","_parent":{"$ref":"AAAAAAFF+qBWK6M3Z8Y="},"name":"Parser","ownedElements":[{"_type":"UMLDependency","_id":"AAAAAAGLr5oSNxq0sAE=","_parent":{"$ref":"AAAAAAGLr5nyTBm+3eU="},"source":{"$ref":"AAAAAAGLr5nyTBm+3eU="},"target":{"$ref":"AAAAAAGLr4t9Fe0SDHU="}},{"_type":"UMLDependency","_id":"AAAAAAGLr5oflht/qLU=","_parent":{"$ref":"AAAAAAGLr5nyTBm+3eU="},"source":{"$ref":"AAAAAAGLr5nyTBm+3eU="},"target":{"$ref":"AAAAAAGLr4u2wO09x0k="}}]}]}]} \ No newline at end of file From 7c1e64d959697bc15ddc239352badefc6decc262 Mon Sep 17 00:00:00 2001 From: mapoint2 Date: Wed, 15 Nov 2023 14:23:15 +0100 Subject: [PATCH 3/6] ajout front controlleur --- .idea/sqldialects.xml | 0 fluxRSS/AltoRouter.php | 304 ++++++++++++++++++ fluxRSS/controleur/FrontControleur.php | 12 + .../.github/workflows/php.yml | 39 +++ .../AltoRouter.php | 302 +++++++++++++++++ .../LICENSE.md | 9 + .../README.md | 57 ++++ .../composer.json | 35 ++ .../phpcs.xml | 10 + 9 files changed, 768 insertions(+) mode change 100644 => 100755 .idea/sqldialects.xml create mode 100755 fluxRSS/AltoRouter.php create mode 100755 fluxRSS/controleur/FrontControleur.php create mode 100755 fluxRSS/dannyvankooten-AltoRouter-ac028a7/.github/workflows/php.yml create mode 100755 fluxRSS/dannyvankooten-AltoRouter-ac028a7/AltoRouter.php create mode 100755 fluxRSS/dannyvankooten-AltoRouter-ac028a7/LICENSE.md create mode 100755 fluxRSS/dannyvankooten-AltoRouter-ac028a7/README.md create mode 100755 fluxRSS/dannyvankooten-AltoRouter-ac028a7/composer.json create mode 100755 fluxRSS/dannyvankooten-AltoRouter-ac028a7/phpcs.xml diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml old mode 100644 new mode 100755 diff --git a/fluxRSS/AltoRouter.php b/fluxRSS/AltoRouter.php new file mode 100755 index 0000000..6c14b90 --- /dev/null +++ b/fluxRSS/AltoRouter.php @@ -0,0 +1,304 @@ + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +namespace vendor; + +class AltoRouter +{ + + /** + * @var array Array of all routes (incl. named routes). + */ + protected $routes = []; + + /** + * @var array Array of all named routes. + */ + protected $namedRoutes = []; + + /** + * @var string Can be used to ignore leading part of the Request URL (if main file lives in subdirectory of host) + */ + protected $basePath = ''; + + /** + * @var array Array of default match types (regex helpers) + */ + protected $matchTypes = [ + 'i' => '[0-9]++', + 'a' => '[0-9A-Za-z]++', + 'h' => '[0-9A-Fa-f]++', + '*' => '.+?', + '**' => '.++', + '' => '[^/\.]++' + ]; + + /** + * Create router in one call from config. + * + * @param array $routes + * @param string $basePath + * @param array $matchTypes + * @throws Exception + */ + public function __construct(array $routes = [], $basePath = '', array $matchTypes = []) + { + $this->addRoutes($routes); + $this->setBasePath($basePath); + $this->addMatchTypes($matchTypes); + } + + /** + * Retrieves all routes. + * Useful if you want to process or display routes. + * @return array All routes. + */ + public function getRoutes() + { + return $this->routes; + } + + /** + * Add multiple routes at once from array in the following format: + * + * $routes = [ + * [$method, $route, $target, $name] + * ]; + * + * @param array $routes + * @return void + * @author Koen Punt + * @throws Exception + */ + public function addRoutes($routes) + { + if (!is_array($routes) && !$routes instanceof Traversable) { + throw new RuntimeException('Routes should be an array or an instance of Traversable'); + } + foreach ($routes as $route) { + call_user_func_array([$this, 'map'], $route); + } + } + + /** + * Set the base path. + * Useful if you are running your application from a subdirectory. + * @param string $basePath + */ + public function setBasePath($basePath) + { + $this->basePath = $basePath; + } + + /** + * Add named match types. It uses array_merge so keys can be overwritten. + * + * @param array $matchTypes The key is the name and the value is the regex. + */ + public function addMatchTypes(array $matchTypes) + { + $this->matchTypes = array_merge($this->matchTypes, $matchTypes); + } + + /** + * Map a route to a target + * + * @param string $method One of 5 HTTP Methods, or a pipe-separated list of multiple HTTP Methods (GET|POST|PATCH|PUT|DELETE) + * @param string $route The route regex, custom regex must start with an @. You can use multiple pre-set regex filters, like [i:id] + * @param mixed $target The target where this route should point to. Can be anything. + * @param string $name Optional name of this route. Supply if you want to reverse route this url in your application. + * @throws Exception + */ + public function map($method, $route, $target, $name = null) + { + + $this->routes[] = [$method, $route, $target, $name]; + + if ($name) { + if (isset($this->namedRoutes[$name])) { + throw new RuntimeException("Can not redeclare route '{$name}'"); + } + $this->namedRoutes[$name] = $route; + } + + return; + } + + /** + * Reversed routing + * + * Generate the URL for a named route. Replace regexes with supplied parameters + * + * @param string $routeName The name of the route. + * @param array @params Associative array of parameters to replace placeholders with. + * @return string The URL of the route with named parameters in place. + * @throws Exception + */ + public function generate($routeName, array $params = []) + { + + // Check if named route exists + if (!isset($this->namedRoutes[$routeName])) { + throw new RuntimeException("Route '{$routeName}' does not exist."); + } + + // Replace named parameters + $route = $this->namedRoutes[$routeName]; + + // prepend base path to route url again + $url = $this->basePath . $route; + + if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) { + foreach ($matches as $index => $match) { + list($block, $pre, $type, $param, $optional) = $match; + + if ($pre) { + $block = substr($block, 1); + } + + if (isset($params[$param])) { + // Part is found, replace for param value + $url = str_replace($block, $params[$param], $url); + } elseif ($optional && $index !== 0) { + // Only strip preceding slash if it's not at the base + $url = str_replace($pre . $block, '', $url); + } else { + // Strip match block + $url = str_replace($block, '', $url); + } + } + } + + return $url; + } + + /** + * Match a given Request Url against stored routes + * @param string $requestUrl + * @param string $requestMethod + * @return array|boolean Array with route information on success, false on failure (no match). + */ + public function match($requestUrl = null, $requestMethod = null) + { + + $params = []; + + // set Request Url if it isn't passed as parameter + if ($requestUrl === null) { + $requestUrl = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/'; + } + + // strip base path from request url + $requestUrl = substr($requestUrl, strlen($this->basePath)); + + // Strip query string (?a=b) from Request Url + if (($strpos = strpos($requestUrl, '?')) !== false) { + $requestUrl = substr($requestUrl, 0, $strpos); + } + + $lastRequestUrlChar = $requestUrl ? $requestUrl[strlen($requestUrl)-1] : ''; + + // set Request Method if it isn't passed as a parameter + if ($requestMethod === null) { + $requestMethod = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; + } + + foreach ($this->routes as $handler) { + list($methods, $route, $target, $name) = $handler; + + $method_match = (stripos($methods, $requestMethod) !== false); + + // Method did not match, continue to next route. + if (!$method_match) { + continue; + } + + if ($route === '*') { + // * wildcard (matches all) + $match = true; + } elseif (isset($route[0]) && $route[0] === '@') { + // @ regex delimiter + $pattern = '`' . substr($route, 1) . '`u'; + $match = preg_match($pattern, $requestUrl, $params) === 1; + } elseif (($position = strpos($route, '[')) === false) { + // No params in url, do string comparison + $match = strcmp($requestUrl, $route) === 0; + } else { + // Compare longest non-param string with url before moving on to regex + // Check if last character before param is a slash, because it could be optional if param is optional too (see https://github.com/dannyvankooten/AltoRouter/issues/241) + if (strncmp($requestUrl, $route, $position) !== 0 && ($lastRequestUrlChar === '/' || $route[$position-1] !== '/')) { + continue; + } + + $regex = $this->compileRoute($route); + $match = preg_match($regex, $requestUrl, $params) === 1; + } + + if ($match) { + if ($params) { + foreach ($params as $key => $value) { + if (is_numeric($key)) { + unset($params[$key]); + } + } + } + + return [ + 'target' => $target, + 'params' => $params, + 'name' => $name + ]; + } + } + + return false; + } + + /** + * Compile the regex for a given route (EXPENSIVE) + * @param $route + * @return string + */ + protected function compileRoute($route) + { + if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) { + $matchTypes = $this->matchTypes; + foreach ($matches as $match) { + list($block, $pre, $type, $param, $optional) = $match; + + if (isset($matchTypes[$type])) { + $type = $matchTypes[$type]; + } + if ($pre === '.') { + $pre = '\.'; + } + + $optional = $optional !== '' ? '?' : null; + + //Older versions of PCRE require the 'P' in (?P) + $pattern = '(?:' + . ($pre !== '' ? $pre : null) + . '(' + . ($param !== '' ? "?P<$param>" : null) + . $type + . ')' + . $optional + . ')' + . $optional; + + $route = str_replace($block, $pattern, $route); + } + } + return "`^$route$`u"; + } +} diff --git a/fluxRSS/controleur/FrontControleur.php b/fluxRSS/controleur/FrontControleur.php new file mode 100755 index 0000000..bfceb74 --- /dev/null +++ b/fluxRSS/controleur/FrontControleur.php @@ -0,0 +1,12 @@ + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +class AltoRouter +{ + + /** + * @var array Array of all routes (incl. named routes). + */ + protected $routes = []; + + /** + * @var array Array of all named routes. + */ + protected $namedRoutes = []; + + /** + * @var string Can be used to ignore leading part of the Request URL (if main file lives in subdirectory of host) + */ + protected $basePath = ''; + + /** + * @var array Array of default match types (regex helpers) + */ + protected $matchTypes = [ + 'i' => '[0-9]++', + 'a' => '[0-9A-Za-z]++', + 'h' => '[0-9A-Fa-f]++', + '*' => '.+?', + '**' => '.++', + '' => '[^/\.]++' + ]; + + /** + * Create router in one call from config. + * + * @param array $routes + * @param string $basePath + * @param array $matchTypes + * @throws Exception + */ + public function __construct(array $routes = [], $basePath = '', array $matchTypes = []) + { + $this->addRoutes($routes); + $this->setBasePath($basePath); + $this->addMatchTypes($matchTypes); + } + + /** + * Retrieves all routes. + * Useful if you want to process or display routes. + * @return array All routes. + */ + public function getRoutes() + { + return $this->routes; + } + + /** + * Add multiple routes at once from array in the following format: + * + * $routes = [ + * [$method, $route, $target, $name] + * ]; + * + * @param array $routes + * @return void + * @author Koen Punt + * @throws Exception + */ + public function addRoutes($routes) + { + if (!is_array($routes) && !$routes instanceof Traversable) { + throw new RuntimeException('Routes should be an array or an instance of Traversable'); + } + foreach ($routes as $route) { + call_user_func_array([$this, 'map'], $route); + } + } + + /** + * Set the base path. + * Useful if you are running your application from a subdirectory. + * @param string $basePath + */ + public function setBasePath($basePath) + { + $this->basePath = $basePath; + } + + /** + * Add named match types. It uses array_merge so keys can be overwritten. + * + * @param array $matchTypes The key is the name and the value is the regex. + */ + public function addMatchTypes(array $matchTypes) + { + $this->matchTypes = array_merge($this->matchTypes, $matchTypes); + } + + /** + * Map a route to a target + * + * @param string $method One of 5 HTTP Methods, or a pipe-separated list of multiple HTTP Methods (GET|POST|PATCH|PUT|DELETE) + * @param string $route The route regex, custom regex must start with an @. You can use multiple pre-set regex filters, like [i:id] + * @param mixed $target The target where this route should point to. Can be anything. + * @param string $name Optional name of this route. Supply if you want to reverse route this url in your application. + * @throws Exception + */ + public function map($method, $route, $target, $name = null) + { + + $this->routes[] = [$method, $route, $target, $name]; + + if ($name) { + if (isset($this->namedRoutes[$name])) { + throw new RuntimeException("Can not redeclare route '{$name}'"); + } + $this->namedRoutes[$name] = $route; + } + + return; + } + + /** + * Reversed routing + * + * Generate the URL for a named route. Replace regexes with supplied parameters + * + * @param string $routeName The name of the route. + * @param array @params Associative array of parameters to replace placeholders with. + * @return string The URL of the route with named parameters in place. + * @throws Exception + */ + public function generate($routeName, array $params = []) + { + + // Check if named route exists + if (!isset($this->namedRoutes[$routeName])) { + throw new RuntimeException("Route '{$routeName}' does not exist."); + } + + // Replace named parameters + $route = $this->namedRoutes[$routeName]; + + // prepend base path to route url again + $url = $this->basePath . $route; + + if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) { + foreach ($matches as $index => $match) { + list($block, $pre, $type, $param, $optional) = $match; + + if ($pre) { + $block = substr($block, 1); + } + + if (isset($params[$param])) { + // Part is found, replace for param value + $url = str_replace($block, $params[$param], $url); + } elseif ($optional && $index !== 0) { + // Only strip preceding slash if it's not at the base + $url = str_replace($pre . $block, '', $url); + } else { + // Strip match block + $url = str_replace($block, '', $url); + } + } + } + + return $url; + } + + /** + * Match a given Request Url against stored routes + * @param string $requestUrl + * @param string $requestMethod + * @return array|boolean Array with route information on success, false on failure (no match). + */ + public function match($requestUrl = null, $requestMethod = null) + { + + $params = []; + + // set Request Url if it isn't passed as parameter + if ($requestUrl === null) { + $requestUrl = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/'; + } + + // strip base path from request url + $requestUrl = substr($requestUrl, strlen($this->basePath)); + + // Strip query string (?a=b) from Request Url + if (($strpos = strpos($requestUrl, '?')) !== false) { + $requestUrl = substr($requestUrl, 0, $strpos); + } + + $lastRequestUrlChar = $requestUrl ? $requestUrl[strlen($requestUrl)-1] : ''; + + // set Request Method if it isn't passed as a parameter + if ($requestMethod === null) { + $requestMethod = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; + } + + foreach ($this->routes as $handler) { + list($methods, $route, $target, $name) = $handler; + + $method_match = (stripos($methods, $requestMethod) !== false); + + // Method did not match, continue to next route. + if (!$method_match) { + continue; + } + + if ($route === '*') { + // * wildcard (matches all) + $match = true; + } elseif (isset($route[0]) && $route[0] === '@') { + // @ regex delimiter + $pattern = '`' . substr($route, 1) . '`u'; + $match = preg_match($pattern, $requestUrl, $params) === 1; + } elseif (($position = strpos($route, '[')) === false) { + // No params in url, do string comparison + $match = strcmp($requestUrl, $route) === 0; + } else { + // Compare longest non-param string with url before moving on to regex + // Check if last character before param is a slash, because it could be optional if param is optional too (see https://github.com/dannyvankooten/AltoRouter/issues/241) + if (strncmp($requestUrl, $route, $position) !== 0 && ($lastRequestUrlChar === '/' || $route[$position-1] !== '/')) { + continue; + } + + $regex = $this->compileRoute($route); + $match = preg_match($regex, $requestUrl, $params) === 1; + } + + if ($match) { + if ($params) { + foreach ($params as $key => $value) { + if (is_numeric($key)) { + unset($params[$key]); + } + } + } + + return [ + 'target' => $target, + 'params' => $params, + 'name' => $name + ]; + } + } + + return false; + } + + /** + * Compile the regex for a given route (EXPENSIVE) + * @param $route + * @return string + */ + protected function compileRoute($route) + { + if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) { + $matchTypes = $this->matchTypes; + foreach ($matches as $match) { + list($block, $pre, $type, $param, $optional) = $match; + + if (isset($matchTypes[$type])) { + $type = $matchTypes[$type]; + } + if ($pre === '.') { + $pre = '\.'; + } + + $optional = $optional !== '' ? '?' : null; + + //Older versions of PCRE require the 'P' in (?P) + $pattern = '(?:' + . ($pre !== '' ? $pre : null) + . '(' + . ($param !== '' ? "?P<$param>" : null) + . $type + . ')' + . $optional + . ')' + . $optional; + + $route = str_replace($block, $pattern, $route); + } + } + return "`^$route$`u"; + } +} diff --git a/fluxRSS/dannyvankooten-AltoRouter-ac028a7/LICENSE.md b/fluxRSS/dannyvankooten-AltoRouter-ac028a7/LICENSE.md new file mode 100755 index 0000000..a1130bb --- /dev/null +++ b/fluxRSS/dannyvankooten-AltoRouter-ac028a7/LICENSE.md @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2012 Danny van Kooten + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/fluxRSS/dannyvankooten-AltoRouter-ac028a7/README.md b/fluxRSS/dannyvankooten-AltoRouter-ac028a7/README.md new file mode 100755 index 0000000..7d6e1fe --- /dev/null +++ b/fluxRSS/dannyvankooten-AltoRouter-ac028a7/README.md @@ -0,0 +1,57 @@ +# AltoRouter ![PHP status](https://github.com/dannyvankooten/AltoRouter/workflows/PHP/badge.svg) [![Latest Stable Version](https://poser.pugx.org/altorouter/altorouter/v/stable.svg)](https://packagist.org/packages/altorouter/altorouter) [![License](https://poser.pugx.org/altorouter/altorouter/license.svg)](https://packagist.org/packages/altorouter/altorouter) + +AltoRouter is a small but powerful routing class, heavily inspired by [klein.php](https://github.com/chriso/klein.php/). + +```php +$router = new AltoRouter(); + +// map homepage +$router->map('GET', '/', function() { + require __DIR__ . '/views/home.php'; +}); + +// dynamic named route +$router->map('GET|POST', '/users/[i:id]/', function($id) { + $user = ..... + require __DIR__ . '/views/user/details.php'; +}, 'user-details'); + +// echo URL to user-details page for ID 5 +echo $router->generate('user-details', ['id' => 5]); // Output: "/users/5" +``` + +## Features + +* Can be used with all HTTP Methods +* Dynamic routing with named route parameters +* Reversed routing +* Flexible regular expression routing (inspired by [Sinatra](http://www.sinatrarb.com/)) +* Custom regexes + +## Getting started + +You need PHP >= 5.6 to use AltoRouter, although we highly recommend you [use an officially supported PHP version](https://secure.php.net/supported-versions.php) that is not EOL. + +- [Install AltoRouter](http://altorouter.com/usage/install.html) +- [Rewrite all requests to AltoRouter](http://altorouter.com/usage/rewrite-requests.html) +- [Map your routes](http://altorouter.com/usage/mapping-routes.html) +- [Match requests](http://altorouter.com/usage/matching-requests.html) +- [Process the request your preferred way](http://altorouter.com/usage/processing-requests.html) + +## Contributors +- [Danny van Kooten](https://github.com/dannyvankooten) +- [Koen Punt](https://github.com/koenpunt) +- [John Long](https://github.com/adduc) +- [Niahoo Osef](https://github.com/niahoo) + +## License + +MIT License + +Copyright (c) 2012 Danny van Kooten + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/fluxRSS/dannyvankooten-AltoRouter-ac028a7/composer.json b/fluxRSS/dannyvankooten-AltoRouter-ac028a7/composer.json new file mode 100755 index 0000000..05bcb40 --- /dev/null +++ b/fluxRSS/dannyvankooten-AltoRouter-ac028a7/composer.json @@ -0,0 +1,35 @@ +{ + "name": "altorouter/altorouter", + "description": "A lightning fast router for PHP", + "keywords": ["router", "routing", "lightweight"], + "homepage": "https://github.com/dannyvankooten/AltoRouter", + "license": "MIT", + "authors": [ + { + "name": "Danny van Kooten", + "email": "dannyvankooten@gmail.com", + "homepage": "http://dannyvankooten.com/" + }, + { + "name": "Koen Punt", + "homepage": "https://github.com/koenpunt" + }, + { + "name": "niahoo", + "homepage": "https://github.com/niahoo" + } + ], + "require": { + "php": ">=5.6.0" + }, + "require-dev": { + "phpunit/phpunit": "9.5.*", + "squizlabs/php_codesniffer": "3.6.2" + }, + "autoload": { + "classmap": ["AltoRouter.php"] + }, + "scripts": { + "test": "vendor/bin/phpunit" + } +} diff --git a/fluxRSS/dannyvankooten-AltoRouter-ac028a7/phpcs.xml b/fluxRSS/dannyvankooten-AltoRouter-ac028a7/phpcs.xml new file mode 100755 index 0000000..d59cccf --- /dev/null +++ b/fluxRSS/dannyvankooten-AltoRouter-ac028a7/phpcs.xml @@ -0,0 +1,10 @@ + + + rules + + + tests + AltoRouter.php + examples/ + + From c00c0a1c491c44a1666572f040f9b9df34933d25 Mon Sep 17 00:00:00 2001 From: mapoint2 Date: Wed, 15 Nov 2023 15:20:57 +0100 Subject: [PATCH 4/6] commit to update composer --- fluxRSS/.htaccess | 3 ++ ...94ad5c44a32007fb7602bc4dc5cebe7a55ad13.php | 6 +-- fluxRSS/config/config.php | 1 + fluxRSS/controleur/AdminControleur.php | 8 ++++ fluxRSS/controleur/FrontControleur.php | 41 ++++++++++++++++++- .../{Controleur.php => UserControleur.php} | 4 +- fluxRSS/index.php | 4 +- fluxRSS/model/AdminModel.php | 5 +++ .../{vuephp1.html => Connection.html} | 0 9 files changed, 64 insertions(+), 8 deletions(-) create mode 100755 fluxRSS/.htaccess create mode 100755 fluxRSS/controleur/AdminControleur.php rename fluxRSS/controleur/{Controleur.php => UserControleur.php} (95%) rename fluxRSS/templates/{vuephp1.html => Connection.html} (100%) diff --git a/fluxRSS/.htaccess b/fluxRSS/.htaccess new file mode 100755 index 0000000..7ded04e --- /dev/null +++ b/fluxRSS/.htaccess @@ -0,0 +1,3 @@ +RewriteEngine on +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule . index.php [L] \ No newline at end of file diff --git a/fluxRSS/cache/7d/7d23d818a9618a39f1bf95b3e694ad5c44a32007fb7602bc4dc5cebe7a55ad13.php b/fluxRSS/cache/7d/7d23d818a9618a39f1bf95b3e694ad5c44a32007fb7602bc4dc5cebe7a55ad13.php index 1dcc316..aa56ec3 100755 --- a/fluxRSS/cache/7d/7d23d818a9618a39f1bf95b3e694ad5c44a32007fb7602bc4dc5cebe7a55ad13.php +++ b/fluxRSS/cache/7d/7d23d818a9618a39f1bf95b3e694ad5c44a32007fb7602bc4dc5cebe7a55ad13.php @@ -12,7 +12,7 @@ use Twig\Sandbox\SecurityNotAllowedFunctionError; use Twig\Source; use Twig\Template; -/* vuephp1.html */ +/* Connection.html */ class __TwigTemplate_2ce784f5b9085065b66af58be97997ff169e0f0d71d95a1d280acea4a24fd4e6 extends Template { private $source; @@ -165,7 +165,7 @@ utilisation anormale de la vuephp public function getTemplateName() { - return "vuephp1.html"; + return "Connection.html"; } public function isTraitable() @@ -180,6 +180,6 @@ utilisation anormale de la vuephp public function getSourceContext() { - return new Source("", "vuephp1.html", "/Applications/MAMP/htdocs/phptwig/templates/vuephp1.html"); + return new Source("", "Connection.html", "/Applications/MAMP/htdocs/phptwig/templates/Connection.html"); } } diff --git a/fluxRSS/config/config.php b/fluxRSS/config/config.php index a187ad0..be4f14e 100755 --- a/fluxRSS/config/config.php +++ b/fluxRSS/config/config.php @@ -12,3 +12,4 @@ $rep = __DIR__ . '/../'; $base = 'dbrorossetto'; $login = 'rorossetto'; $mdp = 'tpphp'; +$path = '~mapoint2/Tp/routeur/Srouteur'; diff --git a/fluxRSS/controleur/AdminControleur.php b/fluxRSS/controleur/AdminControleur.php new file mode 100755 index 0000000..6d97769 --- /dev/null +++ b/fluxRSS/controleur/AdminControleur.php @@ -0,0 +1,8 @@ +setBasePath('~/mapoint2/Tp/routeur/Srouteur'); + $router->map('GET', '/', 'UserControler.php'); + $router->map('GET|POST','/user/[a:action]?','UserControler.php'); + $router->map('GET|POST','/admin/[a:action]?','AdminControler.php'); + + $match = $router->match(); + + if (!$match) { + $dVueEreur[] = "Page doesn't exist"; + echo $twig->render('erreur.html', ['dVueEreur' => $dVueEreur]); + } + else { + $controller=$match['target'] ?? null; + $action=$match['params']['action'] ?? null; + try { + $controller = '\\controleur\\' . $controller; + $controller = new $controller; + if($controller == "\\Controler\\AdminControler.php"){ + if (!AdminModel::isAdmin()){ + echo $twig->render('Connection.html'); + } + } + if (is_callable(array($controller, $action))) { + call_user_func_array(array($controller, $action), + array($match['params'])); + } + } + catch (Error $error){ + $dVueEreur[] = "Controller doesn't exist"; + echo $twig->render('erreur.html', ['dVueEreur' => $dVueEreur]); + } + } } } \ No newline at end of file diff --git a/fluxRSS/controleur/Controleur.php b/fluxRSS/controleur/UserControleur.php similarity index 95% rename from fluxRSS/controleur/Controleur.php rename to fluxRSS/controleur/UserControleur.php index 86ef927..7a488fe 100755 --- a/fluxRSS/controleur/Controleur.php +++ b/fluxRSS/controleur/UserControleur.php @@ -3,7 +3,7 @@ namespace controleur; use model\ArticleModel; -class Controleur +class UserControleur { public function __construct() { @@ -81,6 +81,6 @@ class Controleur //'data' => $data, ]; - echo $twig->render('vuephp1.html', ['dVue' => $dVue, 'dVueEreur' => $dVueEreur]); + echo $twig->render('Connection.html', ['dVue' => $dVue, 'dVueEreur' => $dVueEreur]); } }//fin class diff --git a/fluxRSS/index.php b/fluxRSS/index.php index fd16b5b..1eb4352 100755 --- a/fluxRSS/index.php +++ b/fluxRSS/index.php @@ -5,7 +5,7 @@ require_once __DIR__ . '/config/config.php'; require __DIR__ . '/vendor/autoload.php'; -use controleur\Controleur; +use controleur\FrontControleur; //twig $loader = new \Twig\Loader\FilesystemLoader('templates'); @@ -13,6 +13,6 @@ $twig = new \Twig\Environment($loader, [ 'cache' => false, ]); -$cont = new Controleur(); +$cont = new FrontControleur(); diff --git a/fluxRSS/model/AdminModel.php b/fluxRSS/model/AdminModel.php index df3ece6..9d51182 100755 --- a/fluxRSS/model/AdminModel.php +++ b/fluxRSS/model/AdminModel.php @@ -22,4 +22,9 @@ class AdminModel } return null; } + + public static function isAdmin(): bool + { + return $_SESSION['role'] == 'admin'; + } } \ No newline at end of file diff --git a/fluxRSS/templates/vuephp1.html b/fluxRSS/templates/Connection.html similarity index 100% rename from fluxRSS/templates/vuephp1.html rename to fluxRSS/templates/Connection.html From 4658a29e2f97e8bb5caadda6484443a9628d898d Mon Sep 17 00:00:00 2001 From: point Date: Wed, 15 Nov 2023 15:22:55 +0100 Subject: [PATCH 5/6] modif composer --- fluxRSS/vendor/composer/installed.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fluxRSS/vendor/composer/installed.php b/fluxRSS/vendor/composer/installed.php index f85d7f7..26f8284 100755 --- a/fluxRSS/vendor/composer/installed.php +++ b/fluxRSS/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => '__root__', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'ad56f74a69d8ff3b81d0d287531c37da6ef273ab', + 'reference' => 'c00c0a1c491c44a1666572f040f9b9df34933d25', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -13,7 +13,7 @@ '__root__' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'ad56f74a69d8ff3b81d0d287531c37da6ef273ab', + 'reference' => 'c00c0a1c491c44a1666572f040f9b9df34933d25', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), From 74b55bc18906a4639884ce8f33bd06d1657149b3 Mon Sep 17 00:00:00 2001 From: mapoint2 Date: Wed, 15 Nov 2023 15:28:03 +0100 Subject: [PATCH 6/6] modif front controleur --- fluxRSS/controleur/FrontControleur.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fluxRSS/controleur/FrontControleur.php b/fluxRSS/controleur/FrontControleur.php index 3b657a8..cc6b5fc 100755 --- a/fluxRSS/controleur/FrontControleur.php +++ b/fluxRSS/controleur/FrontControleur.php @@ -16,9 +16,9 @@ class FrontControleur $router = new AltoRouter(); $router->setBasePath('~/mapoint2/Tp/routeur/Srouteur'); - $router->map('GET', '/', 'UserControler.php'); - $router->map('GET|POST','/user/[a:action]?','UserControler.php'); - $router->map('GET|POST','/admin/[a:action]?','AdminControler.php'); + $router->map('GET', '/', 'UserControleur.php'); + $router->map('GET|POST','/user/[a:action]?','UserControleur.php'); + $router->map('GET|POST','/admin/[a:action]?','AdminControleur.php'); $match = $router->match(); @@ -32,7 +32,7 @@ class FrontControleur try { $controller = '\\controleur\\' . $controller; $controller = new $controller; - if($controller == "\\Controler\\AdminControler.php"){ + if($controller == "\\controleur\\AdminControleur.php"){ if (!AdminModel::isAdmin()){ echo $twig->render('Connection.html'); }