From ca79f102cff2316dd789a28ba980fe14643acaa0 Mon Sep 17 00:00:00 2001 From: Leo Tuaillon Date: Fri, 3 Nov 2023 17:56:29 +0100 Subject: [PATCH 1/2] premice inscription + refonte autoload et ajout de la librairie PDO --- php/composer.json | 7 +- php/composer.lock | 6 +- php/controleur/UtilisateurControleur.php | 61 ------------ php/index.php | 6 +- php/modeles/UtilisateurModele.php | 41 --------- php/{ => src}/config/.DS_Store | Bin php/{ => src}/config/Validation.php | 2 +- php/{ => src}/config/config.php | 4 +- php/{ => src}/controleur/AdminControleur.php | 6 +- php/{ => src}/controleur/FrontControleur.php | 6 +- php/{ => src}/controleur/MembreControleur.php | 7 +- .../controleur/ModerateurControleur.php | 5 +- php/src/controleur/UtilisateurControleur.php | 87 ++++++++++++++++++ php/{ => src}/dal/Connection.php | 5 +- php/{ => src}/dal/gateway/AlumniGateway.php | 14 +-- .../dal/gateway/EvenementGateway.php | 6 +- php/{ => src}/dal/gateway/OffreGateway.php | 6 +- php/{ => src}/metier/Alumni.php | 33 ++----- php/{ => src}/metier/Article.php | 2 +- php/{ => src}/metier/Evenement.php | 2 +- php/{ => src}/metier/Experience.php | 2 +- php/{ => src}/metier/Formation.php | 2 +- php/{ => src}/metier/Offre.php | 2 +- php/{ => src}/metier/Profil.php | 1 + php/src/metier/Role.php | 8 ++ php/{modeles => src/models}/AdminModele.php | 13 ++- php/{modeles => src/models}/MembreModele.php | 2 +- .../models}/ModerateurControleur.php | 2 +- php/src/models/UtilisateurModele.php | 53 +++++++++++ php/vendor/.DS_Store | Bin 6148 -> 0 bytes php/vendor/autoload.php | 2 +- php/vendor/composer/ClassLoader.php | 0 php/vendor/composer/InstalledVersions.php | 0 php/vendor/composer/LICENSE | 0 php/vendor/composer/autoload_classmap.php | 0 php/vendor/composer/autoload_files.php | 0 php/vendor/composer/autoload_namespaces.php | 0 php/vendor/composer/autoload_psr4.php | 4 +- php/vendor/composer/autoload_real.php | 10 +- php/vendor/composer/autoload_static.php | 37 +++----- php/vendor/composer/installed.json | 0 php/vendor/composer/installed.php | 12 +-- php/vendor/composer/platform_check.php | 0 php/vendor/symfony/polyfill-ctype/Ctype.php | 0 php/vendor/symfony/polyfill-ctype/LICENSE | 0 php/vendor/symfony/polyfill-ctype/README.md | 0 .../symfony/polyfill-ctype/bootstrap.php | 0 .../symfony/polyfill-ctype/bootstrap80.php | 0 .../symfony/polyfill-ctype/composer.json | 0 php/vendor/symfony/polyfill-mbstring/LICENSE | 0 .../symfony/polyfill-mbstring/Mbstring.php | 0 .../symfony/polyfill-mbstring/README.md | 0 .../Resources/unidata/caseFolding.php | 0 .../Resources/unidata/lowerCase.php | 0 .../Resources/unidata/titleCaseRegexp.php | 0 .../Resources/unidata/upperCase.php | 0 .../symfony/polyfill-mbstring/bootstrap.php | 0 .../symfony/polyfill-mbstring/bootstrap80.php | 0 .../symfony/polyfill-mbstring/composer.json | 0 php/vendor/twig/.DS_Store | Bin 6148 -> 0 bytes php/vendor/twig/twig/.DS_Store | Bin 6148 -> 0 bytes php/vendor/twig/twig/CHANGELOG | 0 php/vendor/twig/twig/LICENSE | 0 php/vendor/twig/twig/README.rst | 0 php/vendor/twig/twig/composer.json | 0 .../twig/twig/src/Cache/CacheInterface.php | 0 .../twig/twig/src/Cache/FilesystemCache.php | 0 php/vendor/twig/twig/src/Cache/NullCache.php | 0 php/vendor/twig/twig/src/Compiler.php | 0 php/vendor/twig/twig/src/Environment.php | 0 php/vendor/twig/twig/src/Error/Error.php | 0 .../twig/twig/src/Error/LoaderError.php | 0 .../twig/twig/src/Error/RuntimeError.php | 0 .../twig/twig/src/Error/SyntaxError.php | 0 php/vendor/twig/twig/src/ExpressionParser.php | 0 .../twig/src/Extension/AbstractExtension.php | 0 .../twig/twig/src/Extension/CoreExtension.php | 0 .../twig/src/Extension/DebugExtension.php | 0 .../twig/src/Extension/EscaperExtension.php | 0 .../twig/src/Extension/ExtensionInterface.php | 0 .../twig/src/Extension/GlobalsInterface.php | 0 .../twig/src/Extension/OptimizerExtension.php | 0 .../twig/src/Extension/ProfilerExtension.php | 0 .../Extension/RuntimeExtensionInterface.php | 0 .../twig/src/Extension/SandboxExtension.php | 0 .../twig/src/Extension/StagingExtension.php | 0 .../src/Extension/StringLoaderExtension.php | 0 php/vendor/twig/twig/src/ExtensionSet.php | 0 .../src/FileExtensionEscapingStrategy.php | 0 php/vendor/twig/twig/src/Lexer.php | 0 .../twig/twig/src/Loader/ArrayLoader.php | 0 .../twig/twig/src/Loader/ChainLoader.php | 0 .../twig/twig/src/Loader/FilesystemLoader.php | 0 .../twig/twig/src/Loader/LoaderInterface.php | 0 php/vendor/twig/twig/src/Markup.php | 0 .../twig/twig/src/Node/AutoEscapeNode.php | 0 php/vendor/twig/twig/src/Node/BlockNode.php | 0 .../twig/twig/src/Node/BlockReferenceNode.php | 0 php/vendor/twig/twig/src/Node/BodyNode.php | 0 .../twig/src/Node/CheckSecurityCallNode.php | 0 .../twig/twig/src/Node/CheckSecurityNode.php | 0 .../twig/twig/src/Node/CheckToStringNode.php | 0 .../twig/twig/src/Node/DeprecatedNode.php | 0 php/vendor/twig/twig/src/Node/DoNode.php | 0 php/vendor/twig/twig/src/Node/EmbedNode.php | 0 .../Node/Expression/AbstractExpression.php | 0 .../src/Node/Expression/ArrayExpression.php | 0 .../Expression/ArrowFunctionExpression.php | 0 .../Node/Expression/AssignNameExpression.php | 0 .../Node/Expression/Binary/AbstractBinary.php | 0 .../src/Node/Expression/Binary/AddBinary.php | 0 .../src/Node/Expression/Binary/AndBinary.php | 0 .../Expression/Binary/BitwiseAndBinary.php | 0 .../Expression/Binary/BitwiseOrBinary.php | 0 .../Expression/Binary/BitwiseXorBinary.php | 0 .../Node/Expression/Binary/ConcatBinary.php | 0 .../src/Node/Expression/Binary/DivBinary.php | 0 .../Node/Expression/Binary/EndsWithBinary.php | 0 .../Node/Expression/Binary/EqualBinary.php | 0 .../Node/Expression/Binary/FloorDivBinary.php | 0 .../Node/Expression/Binary/GreaterBinary.php | 0 .../Expression/Binary/GreaterEqualBinary.php | 0 .../Node/Expression/Binary/HasEveryBinary.php | 0 .../Node/Expression/Binary/HasSomeBinary.php | 0 .../src/Node/Expression/Binary/InBinary.php | 0 .../src/Node/Expression/Binary/LessBinary.php | 0 .../Expression/Binary/LessEqualBinary.php | 0 .../Node/Expression/Binary/MatchesBinary.php | 0 .../src/Node/Expression/Binary/ModBinary.php | 0 .../src/Node/Expression/Binary/MulBinary.php | 0 .../Node/Expression/Binary/NotEqualBinary.php | 0 .../Node/Expression/Binary/NotInBinary.php | 0 .../src/Node/Expression/Binary/OrBinary.php | 0 .../Node/Expression/Binary/PowerBinary.php | 0 .../Node/Expression/Binary/RangeBinary.php | 0 .../Expression/Binary/SpaceshipBinary.php | 0 .../Expression/Binary/StartsWithBinary.php | 0 .../src/Node/Expression/Binary/SubBinary.php | 0 .../Expression/BlockReferenceExpression.php | 0 .../src/Node/Expression/CallExpression.php | 0 .../Node/Expression/ConditionalExpression.php | 0 .../Node/Expression/ConstantExpression.php | 0 .../Node/Expression/Filter/DefaultFilter.php | 0 .../src/Node/Expression/FilterExpression.php | 0 .../Node/Expression/FunctionExpression.php | 0 .../src/Node/Expression/GetAttrExpression.php | 0 .../twig/src/Node/Expression/InlinePrint.php | 0 .../Node/Expression/MethodCallExpression.php | 0 .../src/Node/Expression/NameExpression.php | 0 .../Expression/NullCoalesceExpression.php | 0 .../src/Node/Expression/ParentExpression.php | 0 .../Node/Expression/TempNameExpression.php | 0 .../src/Node/Expression/Test/ConstantTest.php | 0 .../src/Node/Expression/Test/DefinedTest.php | 0 .../Node/Expression/Test/DivisiblebyTest.php | 0 .../src/Node/Expression/Test/EvenTest.php | 0 .../src/Node/Expression/Test/NullTest.php | 0 .../twig/src/Node/Expression/Test/OddTest.php | 0 .../src/Node/Expression/Test/SameasTest.php | 0 .../src/Node/Expression/TestExpression.php | 0 .../Node/Expression/Unary/AbstractUnary.php | 0 .../src/Node/Expression/Unary/NegUnary.php | 0 .../src/Node/Expression/Unary/NotUnary.php | 0 .../src/Node/Expression/Unary/PosUnary.php | 0 .../Node/Expression/VariadicExpression.php | 0 php/vendor/twig/twig/src/Node/FlushNode.php | 0 php/vendor/twig/twig/src/Node/ForLoopNode.php | 0 php/vendor/twig/twig/src/Node/ForNode.php | 0 php/vendor/twig/twig/src/Node/IfNode.php | 0 php/vendor/twig/twig/src/Node/ImportNode.php | 0 php/vendor/twig/twig/src/Node/IncludeNode.php | 0 php/vendor/twig/twig/src/Node/MacroNode.php | 0 php/vendor/twig/twig/src/Node/ModuleNode.php | 0 php/vendor/twig/twig/src/Node/Node.php | 0 .../twig/src/Node/NodeCaptureInterface.php | 0 .../twig/src/Node/NodeOutputInterface.php | 0 php/vendor/twig/twig/src/Node/PrintNode.php | 0 php/vendor/twig/twig/src/Node/SandboxNode.php | 0 php/vendor/twig/twig/src/Node/SetNode.php | 0 php/vendor/twig/twig/src/Node/TextNode.php | 0 php/vendor/twig/twig/src/Node/WithNode.php | 0 php/vendor/twig/twig/src/NodeTraverser.php | 0 .../src/NodeVisitor/AbstractNodeVisitor.php | 0 .../src/NodeVisitor/EscaperNodeVisitor.php | 0 .../MacroAutoImportNodeVisitor.php | 0 .../src/NodeVisitor/NodeVisitorInterface.php | 0 .../src/NodeVisitor/OptimizerNodeVisitor.php | 0 .../NodeVisitor/SafeAnalysisNodeVisitor.php | 0 .../src/NodeVisitor/SandboxNodeVisitor.php | 0 php/vendor/twig/twig/src/Parser.php | 0 .../twig/src/Profiler/Dumper/BaseDumper.php | 0 .../src/Profiler/Dumper/BlackfireDumper.php | 0 .../twig/src/Profiler/Dumper/HtmlDumper.php | 0 .../twig/src/Profiler/Dumper/TextDumper.php | 0 .../src/Profiler/Node/EnterProfileNode.php | 0 .../src/Profiler/Node/LeaveProfileNode.php | 0 .../NodeVisitor/ProfilerNodeVisitor.php | 0 php/vendor/twig/twig/src/Profiler/Profile.php | 0 .../RuntimeLoader/ContainerRuntimeLoader.php | 0 .../RuntimeLoader/FactoryRuntimeLoader.php | 0 .../RuntimeLoader/RuntimeLoaderInterface.php | 0 .../twig/twig/src/Sandbox/SecurityError.php | 0 .../Sandbox/SecurityNotAllowedFilterError.php | 0 .../SecurityNotAllowedFunctionError.php | 0 .../Sandbox/SecurityNotAllowedMethodError.php | 0 .../SecurityNotAllowedPropertyError.php | 0 .../Sandbox/SecurityNotAllowedTagError.php | 0 .../twig/twig/src/Sandbox/SecurityPolicy.php | 0 .../src/Sandbox/SecurityPolicyInterface.php | 0 php/vendor/twig/twig/src/Source.php | 0 php/vendor/twig/twig/src/Template.php | 0 php/vendor/twig/twig/src/TemplateWrapper.php | 0 .../twig/src/Test/IntegrationTestCase.php | 0 .../twig/twig/src/Test/NodeTestCase.php | 0 php/vendor/twig/twig/src/Token.php | 0 .../src/TokenParser/AbstractTokenParser.php | 0 .../twig/src/TokenParser/ApplyTokenParser.php | 0 .../src/TokenParser/AutoEscapeTokenParser.php | 0 .../twig/src/TokenParser/BlockTokenParser.php | 0 .../src/TokenParser/DeprecatedTokenParser.php | 0 .../twig/src/TokenParser/DoTokenParser.php | 0 .../twig/src/TokenParser/EmbedTokenParser.php | 0 .../src/TokenParser/ExtendsTokenParser.php | 0 .../twig/src/TokenParser/FlushTokenParser.php | 0 .../twig/src/TokenParser/ForTokenParser.php | 0 .../twig/src/TokenParser/FromTokenParser.php | 0 .../twig/src/TokenParser/IfTokenParser.php | 0 .../src/TokenParser/ImportTokenParser.php | 0 .../src/TokenParser/IncludeTokenParser.php | 0 .../twig/src/TokenParser/MacroTokenParser.php | 0 .../src/TokenParser/SandboxTokenParser.php | 0 .../twig/src/TokenParser/SetTokenParser.php | 0 .../src/TokenParser/TokenParserInterface.php | 0 .../twig/src/TokenParser/UseTokenParser.php | 0 .../twig/src/TokenParser/WithTokenParser.php | 0 php/vendor/twig/twig/src/TokenStream.php | 0 php/vendor/twig/twig/src/TwigFilter.php | 0 php/vendor/twig/twig/src/TwigFunction.php | 0 php/vendor/twig/twig/src/TwigTest.php | 0 .../twig/src/Util/DeprecationCollector.php | 0 .../twig/src/Util/TemplateDirIterator.php | 0 241 files changed, 232 insertions(+), 224 deletions(-) mode change 100755 => 100644 php/composer.json delete mode 100755 php/controleur/UtilisateurControleur.php delete mode 100755 php/modeles/UtilisateurModele.php rename php/{ => src}/config/.DS_Store (100%) rename php/{ => src}/config/Validation.php (95%) rename php/{ => src}/config/config.php (71%) rename php/{ => src}/controleur/AdminControleur.php (91%) rename php/{ => src}/controleur/FrontControleur.php (91%) rename php/{ => src}/controleur/MembreControleur.php (90%) rename php/{ => src}/controleur/ModerateurControleur.php (73%) create mode 100755 php/src/controleur/UtilisateurControleur.php rename php/{ => src}/dal/Connection.php (93%) rename php/{ => src}/dal/gateway/AlumniGateway.php (87%) rename php/{ => src}/dal/gateway/EvenementGateway.php (65%) rename php/{ => src}/dal/gateway/OffreGateway.php (64%) rename php/{ => src}/metier/Alumni.php (57%) rename php/{ => src}/metier/Article.php (97%) rename php/{ => src}/metier/Evenement.php (98%) rename php/{ => src}/metier/Experience.php (98%) rename php/{ => src}/metier/Formation.php (98%) rename php/{ => src}/metier/Offre.php (99%) rename php/{ => src}/metier/Profil.php (98%) create mode 100644 php/src/metier/Role.php rename php/{modeles => src/models}/AdminModele.php (80%) rename php/{modeles => src/models}/MembreModele.php (97%) rename php/{modeles => src/models}/ModerateurControleur.php (62%) create mode 100755 php/src/models/UtilisateurModele.php delete mode 100755 php/vendor/.DS_Store mode change 100755 => 100644 php/vendor/autoload.php mode change 100755 => 100644 php/vendor/composer/ClassLoader.php mode change 100755 => 100644 php/vendor/composer/InstalledVersions.php mode change 100755 => 100644 php/vendor/composer/LICENSE mode change 100755 => 100644 php/vendor/composer/autoload_classmap.php mode change 100755 => 100644 php/vendor/composer/autoload_files.php mode change 100755 => 100644 php/vendor/composer/autoload_namespaces.php mode change 100755 => 100644 php/vendor/composer/autoload_psr4.php mode change 100755 => 100644 php/vendor/composer/autoload_real.php mode change 100755 => 100644 php/vendor/composer/autoload_static.php mode change 100755 => 100644 php/vendor/composer/installed.json mode change 100755 => 100644 php/vendor/composer/installed.php mode change 100755 => 100644 php/vendor/composer/platform_check.php mode change 100755 => 100644 php/vendor/symfony/polyfill-ctype/Ctype.php mode change 100755 => 100644 php/vendor/symfony/polyfill-ctype/LICENSE mode change 100755 => 100644 php/vendor/symfony/polyfill-ctype/README.md mode change 100755 => 100644 php/vendor/symfony/polyfill-ctype/bootstrap.php mode change 100755 => 100644 php/vendor/symfony/polyfill-ctype/bootstrap80.php mode change 100755 => 100644 php/vendor/symfony/polyfill-ctype/composer.json mode change 100755 => 100644 php/vendor/symfony/polyfill-mbstring/LICENSE mode change 100755 => 100644 php/vendor/symfony/polyfill-mbstring/Mbstring.php mode change 100755 => 100644 php/vendor/symfony/polyfill-mbstring/README.md mode change 100755 => 100644 php/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php mode change 100755 => 100644 php/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php mode change 100755 => 100644 php/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php mode change 100755 => 100644 php/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php mode change 100755 => 100644 php/vendor/symfony/polyfill-mbstring/bootstrap.php mode change 100755 => 100644 php/vendor/symfony/polyfill-mbstring/bootstrap80.php mode change 100755 => 100644 php/vendor/symfony/polyfill-mbstring/composer.json delete mode 100755 php/vendor/twig/.DS_Store delete mode 100755 php/vendor/twig/twig/.DS_Store mode change 100755 => 100644 php/vendor/twig/twig/CHANGELOG mode change 100755 => 100644 php/vendor/twig/twig/LICENSE mode change 100755 => 100644 php/vendor/twig/twig/README.rst mode change 100755 => 100644 php/vendor/twig/twig/composer.json mode change 100755 => 100644 php/vendor/twig/twig/src/Cache/CacheInterface.php mode change 100755 => 100644 php/vendor/twig/twig/src/Cache/FilesystemCache.php mode change 100755 => 100644 php/vendor/twig/twig/src/Cache/NullCache.php mode change 100755 => 100644 php/vendor/twig/twig/src/Compiler.php mode change 100755 => 100644 php/vendor/twig/twig/src/Environment.php mode change 100755 => 100644 php/vendor/twig/twig/src/Error/Error.php mode change 100755 => 100644 php/vendor/twig/twig/src/Error/LoaderError.php mode change 100755 => 100644 php/vendor/twig/twig/src/Error/RuntimeError.php mode change 100755 => 100644 php/vendor/twig/twig/src/Error/SyntaxError.php mode change 100755 => 100644 php/vendor/twig/twig/src/ExpressionParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/Extension/AbstractExtension.php mode change 100755 => 100644 php/vendor/twig/twig/src/Extension/CoreExtension.php mode change 100755 => 100644 php/vendor/twig/twig/src/Extension/DebugExtension.php mode change 100755 => 100644 php/vendor/twig/twig/src/Extension/EscaperExtension.php mode change 100755 => 100644 php/vendor/twig/twig/src/Extension/ExtensionInterface.php mode change 100755 => 100644 php/vendor/twig/twig/src/Extension/GlobalsInterface.php mode change 100755 => 100644 php/vendor/twig/twig/src/Extension/OptimizerExtension.php mode change 100755 => 100644 php/vendor/twig/twig/src/Extension/ProfilerExtension.php mode change 100755 => 100644 php/vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php mode change 100755 => 100644 php/vendor/twig/twig/src/Extension/SandboxExtension.php mode change 100755 => 100644 php/vendor/twig/twig/src/Extension/StagingExtension.php mode change 100755 => 100644 php/vendor/twig/twig/src/Extension/StringLoaderExtension.php mode change 100755 => 100644 php/vendor/twig/twig/src/ExtensionSet.php mode change 100755 => 100644 php/vendor/twig/twig/src/FileExtensionEscapingStrategy.php mode change 100755 => 100644 php/vendor/twig/twig/src/Lexer.php mode change 100755 => 100644 php/vendor/twig/twig/src/Loader/ArrayLoader.php mode change 100755 => 100644 php/vendor/twig/twig/src/Loader/ChainLoader.php mode change 100755 => 100644 php/vendor/twig/twig/src/Loader/FilesystemLoader.php mode change 100755 => 100644 php/vendor/twig/twig/src/Loader/LoaderInterface.php mode change 100755 => 100644 php/vendor/twig/twig/src/Markup.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/AutoEscapeNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/BlockNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/BlockReferenceNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/BodyNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/CheckSecurityCallNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/CheckSecurityNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/CheckToStringNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/DeprecatedNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/DoNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/EmbedNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/AbstractExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/ArrayExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/AssignNameExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/AbstractBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/AddBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/AndBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/ConcatBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/DivBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/EqualBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/GreaterBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/HasEveryBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/HasSomeBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/InBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/LessBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/MatchesBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/ModBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/MulBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/NotInBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/OrBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/PowerBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/RangeBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Binary/SubBinary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/BlockReferenceExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/CallExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/ConditionalExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/ConstantExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/FilterExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/FunctionExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/GetAttrExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/InlinePrint.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/MethodCallExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/NameExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/NullCoalesceExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/ParentExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/TempNameExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Test/ConstantTest.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Test/DefinedTest.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Test/EvenTest.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Test/NullTest.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Test/OddTest.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Test/SameasTest.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/TestExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Unary/NotUnary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/Unary/PosUnary.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Expression/VariadicExpression.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/FlushNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/ForLoopNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/ForNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/IfNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/ImportNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/IncludeNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/MacroNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/ModuleNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/Node.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/NodeCaptureInterface.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/NodeOutputInterface.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/PrintNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/SandboxNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/SetNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/TextNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Node/WithNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/NodeTraverser.php mode change 100755 => 100644 php/vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php mode change 100755 => 100644 php/vendor/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php mode change 100755 => 100644 php/vendor/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php mode change 100755 => 100644 php/vendor/twig/twig/src/NodeVisitor/NodeVisitorInterface.php mode change 100755 => 100644 php/vendor/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php mode change 100755 => 100644 php/vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php mode change 100755 => 100644 php/vendor/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php mode change 100755 => 100644 php/vendor/twig/twig/src/Parser.php mode change 100755 => 100644 php/vendor/twig/twig/src/Profiler/Dumper/BaseDumper.php mode change 100755 => 100644 php/vendor/twig/twig/src/Profiler/Dumper/BlackfireDumper.php mode change 100755 => 100644 php/vendor/twig/twig/src/Profiler/Dumper/HtmlDumper.php mode change 100755 => 100644 php/vendor/twig/twig/src/Profiler/Dumper/TextDumper.php mode change 100755 => 100644 php/vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php mode change 100755 => 100644 php/vendor/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php mode change 100755 => 100644 php/vendor/twig/twig/src/Profiler/Profile.php mode change 100755 => 100644 php/vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php mode change 100755 => 100644 php/vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php mode change 100755 => 100644 php/vendor/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php mode change 100755 => 100644 php/vendor/twig/twig/src/Sandbox/SecurityError.php mode change 100755 => 100644 php/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php mode change 100755 => 100644 php/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php mode change 100755 => 100644 php/vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php mode change 100755 => 100644 php/vendor/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php mode change 100755 => 100644 php/vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php mode change 100755 => 100644 php/vendor/twig/twig/src/Sandbox/SecurityPolicy.php mode change 100755 => 100644 php/vendor/twig/twig/src/Sandbox/SecurityPolicyInterface.php mode change 100755 => 100644 php/vendor/twig/twig/src/Source.php mode change 100755 => 100644 php/vendor/twig/twig/src/Template.php mode change 100755 => 100644 php/vendor/twig/twig/src/TemplateWrapper.php mode change 100755 => 100644 php/vendor/twig/twig/src/Test/IntegrationTestCase.php mode change 100755 => 100644 php/vendor/twig/twig/src/Test/NodeTestCase.php mode change 100755 => 100644 php/vendor/twig/twig/src/Token.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/AbstractTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/ApplyTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/AutoEscapeTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/BlockTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/DeprecatedTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/DoTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/EmbedTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/FlushTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/ForTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/FromTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/IfTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/ImportTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/IncludeTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/MacroTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/SandboxTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/SetTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/TokenParserInterface.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/UseTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenParser/WithTokenParser.php mode change 100755 => 100644 php/vendor/twig/twig/src/TokenStream.php mode change 100755 => 100644 php/vendor/twig/twig/src/TwigFilter.php mode change 100755 => 100644 php/vendor/twig/twig/src/TwigFunction.php mode change 100755 => 100644 php/vendor/twig/twig/src/TwigTest.php mode change 100755 => 100644 php/vendor/twig/twig/src/Util/DeprecationCollector.php mode change 100755 => 100644 php/vendor/twig/twig/src/Util/TemplateDirIterator.php diff --git a/php/composer.json b/php/composer.json old mode 100755 new mode 100644 index de876b8..47ef02d --- a/php/composer.json +++ b/php/composer.json @@ -1,12 +1,11 @@ { "require": { - "twig/twig": "^3.0" + "twig/twig": "^3.0", + "ext-pdo": "*" }, "autoload": { "psr-4": { - "controleur\\": "controleur/", - "config\\": "config/", - "modeles\\": "modeles/" + "App\\": "src/" } } } diff --git a/php/composer.lock b/php/composer.lock index efe307c..d392f8d 100755 --- a/php/composer.lock +++ b/php/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6a6772df2521c6860a448e9115f2793a", + "content-hash": "e4bbfb6f07dd88c6288177f48b9cb54c", "packages": [ { "name": "symfony/polyfill-ctype", @@ -249,7 +249,9 @@ "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, - "platform": [], + "platform": { + "ext-pdo": "*" + }, "platform-dev": [], "plugin-api-version": "2.6.0" } diff --git a/php/controleur/UtilisateurControleur.php b/php/controleur/UtilisateurControleur.php deleted file mode 100755 index 0ce215c..0000000 --- a/php/controleur/UtilisateurControleur.php +++ /dev/null @@ -1,61 +0,0 @@ -accueil(); - break; - case "connection": - $this->connection(); - break; - case "inscription": - $this->inscription(); - break; - case "consulterProfilLimite": - $this->consulterProfilLimite(); - break; - default: - $dVueErreur[] ="Action inconnue ou non autorisée"; - echo $twig->render("erreur.html",['dVueErreur' => $dVueErreur]); - - } - } - - protected function connection() - { - global $twig; - echo $twig->render('connexion.html', []); - } - - protected function inscription() - { - global $twig; - echo $twig->render('inscription.html', []); - } - - protected function accueil() - { - global $twig; - echo $twig->render('accueil.html', []); - } - - protected function consulterProfilLimite() - { - //TODO - } - -} \ No newline at end of file diff --git a/php/index.php b/php/index.php index c327eba..242d196 100755 --- a/php/index.php +++ b/php/index.php @@ -2,9 +2,9 @@ /** PC IUT - PHP 8.1 */ /** Chargement config */ -require_once __DIR__ . '/config/config.php'; +require_once __DIR__ . '/src/config/config.php'; require __DIR__ . '/vendor/autoload.php'; -use controleur\FrontControleur; + /** Configuration twig */ $loader = new \Twig\Loader\FilesystemLoader('vues'); @@ -13,4 +13,4 @@ $twig = new \Twig\Environment($loader, [ 'debug' => true ]); -$cont = new \controleur\FrontControleur(); +$cont = new App\controleur\FrontControleur(); diff --git a/php/modeles/UtilisateurModele.php b/php/modeles/UtilisateurModele.php deleted file mode 100755 index f66b0c0..0000000 --- a/php/modeles/UtilisateurModele.php +++ /dev/null @@ -1,41 +0,0 @@ -accueil(); + break; + case "connection": + $this->connection(); + break; + case "inscription": + $this->inscription(); + break; + case "consulterProfilLimite": + $this->consulterProfilLimite(); + break; + default: + $dVueErreur[] ="Action inconnue ou non autorisée"; + echo $twig->render("erreur.html",['dVueErreur' => $dVueErreur]); + + } + } + + protected function connection() + { + global $twig; + echo $twig->render('connexion.html', []); + } + + protected function inscription() + { + global $twig; + $dVueErreur = []; // Tableau pour stocker les erreurs, le cas échéant + + if (isset($_POST['email'], $_POST['username'], $_POST['password'])) { + $email = \App\config\Validation::nettoyerString($_POST['email']); + $motDePasse = \App\config\Validation::nettoyerString($_POST['password']); + + + // Validez les données d'inscription, par exemple, vérifiez si l'email est unique + // Vous pouvez également effectuer d'autres validations nécessaires + + $userModel = new \App\models\UtilisateurModele(); + $nouvelUtilisateur = $userModel->inscription($email, $motDePasse); + + // Si l'inscription a réussi, redirigez l'utilisateur vers une page de confirmation + // Vous pouvez également gérer les erreurs ici en cas d'échec de l'inscription + + if ($nouvelUtilisateur instanceof \App\metier\Alumni) { + // L'inscription a réussi, redirigez l'utilisateur vers une page de confirmation + // par exemple : + header('Location: index.php?action=inscription_success'); + exit(); + } else { + // L'inscription a échoué, ajoutez un message d'erreur + $dVueErreur[] = "L'inscription a échoué, veuillez réessayer."; + } + } + + // Affichez le formulaire d'inscription ou les erreurs le cas échéant + echo $twig->render('inscription.html', ['dVueErreur' => $dVueErreur]); + } + + protected function accueil() + { + global $twig; + echo $twig->render('accueil.html', []); + } + + protected function consulterProfilLimite() + { + //TODO + } + +} \ No newline at end of file diff --git a/php/dal/Connection.php b/php/src/dal/Connection.php similarity index 93% rename from php/dal/Connection.php rename to php/src/dal/Connection.php index 332796d..e8c1e83 100755 --- a/php/dal/Connection.php +++ b/php/src/dal/Connection.php @@ -1,6 +1,7 @@ con = $con; } - public function insert(string $email, int $id, string $motDePasse, Role $role){ - $query='INSERT INTO Alumni VALUES (:i, :e, :m, :r)'; - $this->con->executeQuery($query, array( - ':i' => array($id, PDO::PARAM_INT), + public function insert(string $email, string $motDePasse, string $role){ + $query='INSERT INTO Alumni VALUES (:e, :m, :r)'; + return $this->con->executeQuery($query, array( ':e' => array($email, PDO::PARAM_STR), ':m' => array($motDePasse, PDO::PARAM_STR), ':r' => array($role, PDO::PARAM_STR) diff --git a/php/dal/gateway/EvenementGateway.php b/php/src/dal/gateway/EvenementGateway.php similarity index 65% rename from php/dal/gateway/EvenementGateway.php rename to php/src/dal/gateway/EvenementGateway.php index 6379bcf..ffd0c64 100755 --- a/php/dal/gateway/EvenementGateway.php +++ b/php/src/dal/gateway/EvenementGateway.php @@ -1,13 +1,13 @@ con = $con; } diff --git a/php/dal/gateway/OffreGateway.php b/php/src/dal/gateway/OffreGateway.php similarity index 64% rename from php/dal/gateway/OffreGateway.php rename to php/src/dal/gateway/OffreGateway.php index 8444ebe..d783846 100755 --- a/php/dal/gateway/OffreGateway.php +++ b/php/src/dal/gateway/OffreGateway.php @@ -1,13 +1,13 @@ con = $con; } diff --git a/php/metier/Alumni.php b/php/src/metier/Alumni.php similarity index 57% rename from php/metier/Alumni.php rename to php/src/metier/Alumni.php index d7455c5..159b204 100644 --- a/php/metier/Alumni.php +++ b/php/src/metier/Alumni.php @@ -1,19 +1,8 @@ id = $id; $this->email = $email; $this->motDePasse = $motDePasse; $this->role = $role; } - /** - * @return string - */ - public function getId() : string - { - return $this->id; - } - /** * @return string */ @@ -67,7 +46,7 @@ class Alumni{ return $this->motDePasse; } - public function getRole(): Role + public function getRole(): String { return $this->role; } diff --git a/php/metier/Article.php b/php/src/metier/Article.php similarity index 97% rename from php/metier/Article.php rename to php/src/metier/Article.php index d09a3c6..f2ec4d2 100644 --- a/php/metier/Article.php +++ b/php/src/metier/Article.php @@ -1,5 +1,5 @@ insert($email, $hashpassword, $role)) { + // L'insertion a réussi, retournez le nouvel utilisateur + $nouvelUtilisateur = new \App\metier\Alumni($email, $hashpassword, $role); + return $nouvelUtilisateur; + } else { + // L'insertion a échoué, renvoyez un utilisateur vide pour indiquer l'échec + return new \App\metier\Alumni(null, null, null); + } + } +} diff --git a/php/vendor/.DS_Store b/php/vendor/.DS_Store deleted file mode 100755 index 008eea8b99add3f1414ce665be6c600e10fd2a3e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%}T>S5T317TSVwVp~nTU63w1&ruHr8c(IV45vWY7V84v%Zi|;`2DO zyD8M_Nl=j)nEiI=Ct5>$zrHCl>GZe(ohq0f= zqorsz{6z-n+m+xR6bxa6W{)8PU`hHQCKOiuC1eNtlxSMD)o|XGKt;p z_?lK1N`-zt@A{WPKkZbuPF0k2gQ!2&2|=%qAvae+)KjUeCQ&cext?*9Q970Cbh>-g ztjR{JHLJ;KvsJIj!{hzgtX$gO**iJ!Jch$aJsUCw?mI1;7IS#P$x>ZU-Z%@02M21aIp8DIu119Uz} zR6@sMW>6m;IOrAtk$xk!;GB91%8?cwinR#mt~d2Vt8J zVc#rlha&Xb@%d7RgK!M;$P6$8iwvxoWrgnlv# array($baseDir . '/modeles'), - 'controleur\\' => array($baseDir . '/controleur'), - 'config\\' => array($baseDir . '/config'), 'Twig\\' => array($vendorDir . '/twig/twig/src'), 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'), + 'App\\' => array($baseDir . '/src'), ); diff --git a/php/vendor/composer/autoload_real.php b/php/vendor/composer/autoload_real.php old mode 100755 new mode 100644 index 176c88b..00084e8 --- a/php/vendor/composer/autoload_real.php +++ b/php/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInita6287a55fe354aae4af95d1e4395c915 +class ComposerAutoloaderInite4bbfb6f07dd88c6288177f48b9cb54c { private static $loader; @@ -24,16 +24,16 @@ class ComposerAutoloaderInita6287a55fe354aae4af95d1e4395c915 require __DIR__ . '/platform_check.php'; - spl_autoload_register(array('ComposerAutoloaderInita6287a55fe354aae4af95d1e4395c915', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInite4bbfb6f07dd88c6288177f48b9cb54c', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInita6287a55fe354aae4af95d1e4395c915', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInite4bbfb6f07dd88c6288177f48b9cb54c', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInita6287a55fe354aae4af95d1e4395c915::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInite4bbfb6f07dd88c6288177f48b9cb54c::getInitializer($loader)); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInita6287a55fe354aae4af95d1e4395c915::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInite4bbfb6f07dd88c6288177f48b9cb54c::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/php/vendor/composer/autoload_static.php b/php/vendor/composer/autoload_static.php old mode 100755 new mode 100644 index dc37466..5d3fa7b --- a/php/vendor/composer/autoload_static.php +++ b/php/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInita6287a55fe354aae4af95d1e4395c915 +class ComposerStaticInite4bbfb6f07dd88c6288177f48b9cb54c { public static $files = array ( '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', @@ -12,15 +12,6 @@ class ComposerStaticInita6287a55fe354aae4af95d1e4395c915 ); public static $prefixLengthsPsr4 = array ( - 'm' => - array ( - 'modeles\\' => 8, - ), - 'c' => - array ( - 'controleur\\' => 11, - 'config\\' => 7, - ), 'T' => array ( 'Twig\\' => 5, @@ -30,21 +21,13 @@ class ComposerStaticInita6287a55fe354aae4af95d1e4395c915 'Symfony\\Polyfill\\Mbstring\\' => 26, 'Symfony\\Polyfill\\Ctype\\' => 23, ), + 'A' => + array ( + 'App\\' => 4, + ), ); public static $prefixDirsPsr4 = array ( - 'modeles\\' => - array ( - 0 => __DIR__ . '/../..' . '/modeles', - ), - 'controleur\\' => - array ( - 0 => __DIR__ . '/../..' . '/controleur', - ), - 'config\\' => - array ( - 0 => __DIR__ . '/../..' . '/config', - ), 'Twig\\' => array ( 0 => __DIR__ . '/..' . '/twig/twig/src', @@ -57,6 +40,10 @@ class ComposerStaticInita6287a55fe354aae4af95d1e4395c915 array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', ), + 'App\\' => + array ( + 0 => __DIR__ . '/../..' . '/src', + ), ); public static $classMap = array ( @@ -66,9 +53,9 @@ class ComposerStaticInita6287a55fe354aae4af95d1e4395c915 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInita6287a55fe354aae4af95d1e4395c915::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInita6287a55fe354aae4af95d1e4395c915::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInita6287a55fe354aae4af95d1e4395c915::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInite4bbfb6f07dd88c6288177f48b9cb54c::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInite4bbfb6f07dd88c6288177f48b9cb54c::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInite4bbfb6f07dd88c6288177f48b9cb54c::$classMap; }, null, ClassLoader::class); } diff --git a/php/vendor/composer/installed.json b/php/vendor/composer/installed.json old mode 100755 new mode 100644 diff --git a/php/vendor/composer/installed.php b/php/vendor/composer/installed.php old mode 100755 new mode 100644 index a25b246..9500923 --- a/php/vendor/composer/installed.php +++ b/php/vendor/composer/installed.php @@ -1,9 +1,9 @@ array( 'name' => '__root__', - 'pretty_version' => '1.0.0+no-version-set', - 'version' => '1.0.0.0', - 'reference' => NULL, + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'reference' => '68bdbc2afe49996b3ceec196c42f5e25b3edec96', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -11,9 +11,9 @@ ), 'versions' => array( '__root__' => array( - 'pretty_version' => '1.0.0+no-version-set', - 'version' => '1.0.0.0', - 'reference' => NULL, + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'reference' => '68bdbc2afe49996b3ceec196c42f5e25b3edec96', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/php/vendor/composer/platform_check.php b/php/vendor/composer/platform_check.php old mode 100755 new mode 100644 diff --git a/php/vendor/symfony/polyfill-ctype/Ctype.php b/php/vendor/symfony/polyfill-ctype/Ctype.php old mode 100755 new mode 100644 diff --git a/php/vendor/symfony/polyfill-ctype/LICENSE b/php/vendor/symfony/polyfill-ctype/LICENSE old mode 100755 new mode 100644 diff --git a/php/vendor/symfony/polyfill-ctype/README.md b/php/vendor/symfony/polyfill-ctype/README.md old mode 100755 new mode 100644 diff --git a/php/vendor/symfony/polyfill-ctype/bootstrap.php b/php/vendor/symfony/polyfill-ctype/bootstrap.php old mode 100755 new mode 100644 diff --git a/php/vendor/symfony/polyfill-ctype/bootstrap80.php b/php/vendor/symfony/polyfill-ctype/bootstrap80.php old mode 100755 new mode 100644 diff --git a/php/vendor/symfony/polyfill-ctype/composer.json b/php/vendor/symfony/polyfill-ctype/composer.json old mode 100755 new mode 100644 diff --git a/php/vendor/symfony/polyfill-mbstring/LICENSE b/php/vendor/symfony/polyfill-mbstring/LICENSE old mode 100755 new mode 100644 diff --git a/php/vendor/symfony/polyfill-mbstring/Mbstring.php b/php/vendor/symfony/polyfill-mbstring/Mbstring.php old mode 100755 new mode 100644 diff --git a/php/vendor/symfony/polyfill-mbstring/README.md b/php/vendor/symfony/polyfill-mbstring/README.md old mode 100755 new mode 100644 diff --git a/php/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php b/php/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php old mode 100755 new mode 100644 diff --git a/php/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/php/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php old mode 100755 new mode 100644 diff --git a/php/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/php/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php old mode 100755 new mode 100644 diff --git a/php/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php b/php/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php old mode 100755 new mode 100644 diff --git a/php/vendor/symfony/polyfill-mbstring/bootstrap.php b/php/vendor/symfony/polyfill-mbstring/bootstrap.php old mode 100755 new mode 100644 diff --git a/php/vendor/symfony/polyfill-mbstring/bootstrap80.php b/php/vendor/symfony/polyfill-mbstring/bootstrap80.php old mode 100755 new mode 100644 diff --git a/php/vendor/symfony/polyfill-mbstring/composer.json b/php/vendor/symfony/polyfill-mbstring/composer.json old mode 100755 new mode 100644 diff --git a/php/vendor/twig/.DS_Store b/php/vendor/twig/.DS_Store deleted file mode 100755 index af8e1914064e91ee44cf53eb360e395ddf543b9d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%}T>S5Z-O0Z7D(y3Oz1(E!bM2EnY&bFJMFuDm5Xc24l7~sX3HF&iX<=iO=KA z?nW%utB9R}-EV$(vma!C7-QUBgk8pL##kL1B1dI|pnGGeVv-R#juGVPEQn=`WK6_n5QJbUvbmdO-+Wqz4QNDL4I!~ij{y$qN$ zq2AnH3TWlT05R|b1Gqm3Xo!x%LZjL`pu_7k#w|n?(D5ySC=5CV3ylx~;kp!1mvZyO z;JO_A!sIyy3yr#*aWylHV`eTNFI>$IexcGCcQjH@3=jkB3{n z!~iky&lup=$Q!w^D08-cTOOXZ0@^(^6wE770ResO5&#D7BP|uwae+GIIR*=jI12hz QIUrpG6d}|R1HZt)2hd(hfB*mh diff --git a/php/vendor/twig/twig/.DS_Store b/php/vendor/twig/twig/.DS_Store deleted file mode 100755 index e1958d20a0ed2142ea26772cea023c288c9976ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%}T>S5Z-O8Z7D(y3Oz1(E!bM2EnY&bFJMFuDm5`hgE3o@)Er77XMG``#OHBl zcLNr47O^w1`_1oe_JiyXV~jh?V8EEg7;8a8Q5`*}*SVI^(uR>WKkjV3UEmHZ45=&*7J;eB^JIkVOm- z1OJQx-k7>m2Nq?{)*s8mvsOU6hlYZA1u7t*Z(IVvz Date: Sun, 5 Nov 2023 21:16:35 +0100 Subject: [PATCH 2/2] new archi + inscription fonctionnel (sans les gestions d'erreur) --- php/.htaccess | 6 +++++ php/index.php | 16 ----------- php/{ => public}/css/.DS_Store | Bin php/{ => public}/css/accueil.css | 0 php/{ => public}/css/connexion.css | 0 php/{ => public}/css/erreur.css | 0 php/{ => public}/css/inscription.css | 0 php/public/index.php | 16 +++++++++++ php/src/Autoloader.php | 17 ++++++++++++ php/src/config/config.php | 4 +-- php/src/controleur/UtilisateurControleur.php | 4 +-- php/src/{dal => }/gateway/AlumniGateway.php | 16 ++++++----- php/src/{dal => gateway}/Connection.php | 3 ++- .../{dal => }/gateway/EvenementGateway.php | 6 ++--- php/src/{dal => }/gateway/OffreGateway.php | 6 ++--- php/src/{models => modele}/AdminModele.php | 7 ++--- php/src/{metier => modele}/Alumni.php | 2 +- php/src/{metier => modele}/Article.php | 3 ++- php/src/{metier => modele}/Evenement.php | 3 ++- php/src/{metier => modele}/Experience.php | 3 ++- php/src/{metier => modele}/Formation.php | 3 ++- php/src/{models => modele}/MembreModele.php | 2 +- php/src/{metier => modele}/Offre.php | 25 +++++++++--------- php/src/{metier => modele}/Profil.php | 3 ++- php/src/{metier => modele}/Role.php | 2 +- .../{models => modele}/UtilisateurModele.php | 24 ++++++++--------- php/src/models/ModerateurControleur.php | 8 ------ php/{vues => templates}/accueil.html | 4 +-- php/{vues => templates}/connexion.html | 4 +-- php/{vues => templates}/erreur.html | 4 +-- php/{vues => templates}/inscription.html | 4 +-- php/vendor/composer/installed.php | 4 +-- php/vues/.DS_Store | Bin 6148 -> 0 bytes 33 files changed, 110 insertions(+), 89 deletions(-) create mode 100644 php/.htaccess delete mode 100755 php/index.php rename php/{ => public}/css/.DS_Store (100%) rename php/{ => public}/css/accueil.css (100%) rename php/{ => public}/css/connexion.css (100%) rename php/{ => public}/css/erreur.css (100%) rename php/{ => public}/css/inscription.css (100%) create mode 100755 php/public/index.php create mode 100644 php/src/Autoloader.php rename php/src/{dal => }/gateway/AlumniGateway.php (85%) rename php/src/{dal => gateway}/Connection.php (97%) rename php/src/{dal => }/gateway/EvenementGateway.php (64%) rename php/src/{dal => }/gateway/OffreGateway.php (64%) rename php/src/{models => modele}/AdminModele.php (90%) rename php/src/{metier => modele}/Alumni.php (97%) rename php/src/{metier => modele}/Article.php (97%) rename php/src/{metier => modele}/Evenement.php (98%) rename php/src/{metier => modele}/Experience.php (98%) rename php/src/{metier => modele}/Formation.php (98%) rename php/src/{models => modele}/MembreModele.php (97%) rename php/src/{metier => modele}/Offre.php (81%) rename php/src/{metier => modele}/Profil.php (98%) rename php/src/{metier => modele}/Role.php (77%) rename php/src/{models => modele}/UtilisateurModele.php (61%) delete mode 100755 php/src/models/ModerateurControleur.php rename php/{vues => templates}/accueil.html (75%) rename php/{vues => templates}/connexion.html (90%) rename php/{vues => templates}/erreur.html (74%) rename php/{vues => templates}/inscription.html (91%) delete mode 100755 php/vues/.DS_Store diff --git a/php/.htaccess b/php/.htaccess new file mode 100644 index 0000000..095bf2a --- /dev/null +++ b/php/.htaccess @@ -0,0 +1,6 @@ + + RewriteEngine On + RewriteBase /php/public/ + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.*)$ index.php [QSA,L] + diff --git a/php/index.php b/php/index.php deleted file mode 100755 index 242d196..0000000 --- a/php/index.php +++ /dev/null @@ -1,16 +0,0 @@ - false, - 'debug' => true -]); - -$cont = new App\controleur\FrontControleur(); diff --git a/php/css/.DS_Store b/php/public/css/.DS_Store similarity index 100% rename from php/css/.DS_Store rename to php/public/css/.DS_Store diff --git a/php/css/accueil.css b/php/public/css/accueil.css similarity index 100% rename from php/css/accueil.css rename to php/public/css/accueil.css diff --git a/php/css/connexion.css b/php/public/css/connexion.css similarity index 100% rename from php/css/connexion.css rename to php/public/css/connexion.css diff --git a/php/css/erreur.css b/php/public/css/erreur.css similarity index 100% rename from php/css/erreur.css rename to php/public/css/erreur.css diff --git a/php/css/inscription.css b/php/public/css/inscription.css similarity index 100% rename from php/css/inscription.css rename to php/public/css/inscription.css diff --git a/php/public/index.php b/php/public/index.php new file mode 100755 index 0000000..8a015ce --- /dev/null +++ b/php/public/index.php @@ -0,0 +1,16 @@ + false, + 'debug' => true +]); + +$cont = new \App\controleur\FrontControleur(); \ No newline at end of file diff --git a/php/src/Autoloader.php b/php/src/Autoloader.php new file mode 100644 index 0000000..7d6ac76 --- /dev/null +++ b/php/src/Autoloader.php @@ -0,0 +1,17 @@ +inscription($email, $motDePasse); // Si l'inscription a réussi, redirigez l'utilisateur vers une page de confirmation // Vous pouvez également gérer les erreurs ici en cas d'échec de l'inscription - if ($nouvelUtilisateur instanceof \App\metier\Alumni) { + if ($nouvelUtilisateur instanceof \App\modele\Alumni) { // L'inscription a réussi, redirigez l'utilisateur vers une page de confirmation // par exemple : header('Location: index.php?action=inscription_success'); diff --git a/php/src/dal/gateway/AlumniGateway.php b/php/src/gateway/AlumniGateway.php similarity index 85% rename from php/src/dal/gateway/AlumniGateway.php rename to php/src/gateway/AlumniGateway.php index 7819d4b..1a00ff4 100644 --- a/php/src/dal/gateway/AlumniGateway.php +++ b/php/src/gateway/AlumniGateway.php @@ -1,26 +1,28 @@ con = $con; } public function insert(string $email, string $motDePasse, string $role){ - $query='INSERT INTO Alumni VALUES (:e, :m, :r)'; + $query = 'INSERT INTO Alumni (mail, mdp, role) VALUES (:mail, :mdp, :role)'; return $this->con->executeQuery($query, array( - ':e' => array($email, PDO::PARAM_STR), - ':m' => array($motDePasse, PDO::PARAM_STR), - ':r' => array($role, PDO::PARAM_STR) + ':mail' => array($email, PDO::PARAM_STR), + ':mdp' => array($motDePasse, PDO::PARAM_STR), + ':role' => array($role, PDO::PARAM_STR) )); } + public function updateEmail(int $id, string $newEmail){ $query='UPDATE Alumni SET email=:new WHERE id=:i'; $this->con->executeQuery($query, array( diff --git a/php/src/dal/Connection.php b/php/src/gateway/Connection.php similarity index 97% rename from php/src/dal/Connection.php rename to php/src/gateway/Connection.php index e8c1e83..1389c2a 100755 --- a/php/src/dal/Connection.php +++ b/php/src/gateway/Connection.php @@ -1,6 +1,7 @@ con = $con; } diff --git a/php/src/dal/gateway/OffreGateway.php b/php/src/gateway/OffreGateway.php similarity index 64% rename from php/src/dal/gateway/OffreGateway.php rename to php/src/gateway/OffreGateway.php index d783846..85e4aab 100755 --- a/php/src/dal/gateway/OffreGateway.php +++ b/php/src/gateway/OffreGateway.php @@ -1,13 +1,13 @@ con = $con; } diff --git a/php/src/models/AdminModele.php b/php/src/modele/AdminModele.php similarity index 90% rename from php/src/models/AdminModele.php rename to php/src/modele/AdminModele.php index 21bdcdb..5cc4474 100755 --- a/php/src/models/AdminModele.php +++ b/php/src/modele/AdminModele.php @@ -1,9 +1,6 @@ id = $id; $this->offreur = $offreur; @@ -161,7 +162,7 @@ class Offre return $this->imageUrl; } - public function getTypeContrat(): TypeContrat + public function getTypeContrat(): \App\metier\TypeContrat { return $this->typeContrat; } @@ -191,7 +192,7 @@ class Offre return $this->experience; } - public function getNiveauEtudes(): NiveauEtudes + public function getNiveauEtudes(): \App\metier\NiveauEtudes { return $this->niveauEtudes; } diff --git a/php/src/metier/Profil.php b/php/src/modele/Profil.php similarity index 98% rename from php/src/metier/Profil.php rename to php/src/modele/Profil.php index a05b32e..69e5bc5 100644 --- a/php/src/metier/Profil.php +++ b/php/src/modele/Profil.php @@ -1,5 +1,6 @@ insert($email, $hashpassword, $role)) { // L'insertion a réussi, retournez le nouvel utilisateur - $nouvelUtilisateur = new \App\metier\Alumni($email, $hashpassword, $role); + $nouvelUtilisateur = new \App\modele\Alumni($email, $hashpassword, $role); return $nouvelUtilisateur; } else { // L'insertion a échoué, renvoyez un utilisateur vide pour indiquer l'échec - return new \App\metier\Alumni(null, null, null); + return new \App\modele\Alumni(null, null, null); } } } diff --git a/php/src/models/ModerateurControleur.php b/php/src/models/ModerateurControleur.php deleted file mode 100755 index 608bf52..0000000 --- a/php/src/models/ModerateurControleur.php +++ /dev/null @@ -1,8 +0,0 @@ - - + Alica - Accueil @@ -15,7 +15,7 @@

Vous pouvez aussi consulter les articles

Vous pouvez aussi consulter les annonces

Connexion :

-
+
diff --git a/php/vues/connexion.html b/php/templates/connexion.html similarity index 90% rename from php/vues/connexion.html rename to php/templates/connexion.html index d3508c5..2dd061a 100755 --- a/php/vues/connexion.html +++ b/php/templates/connexion.html @@ -4,7 +4,7 @@ Alica - Connexion - +
@@ -37,7 +37,7 @@
-
+
diff --git a/php/vues/erreur.html b/php/templates/erreur.html similarity index 74% rename from php/vues/erreur.html rename to php/templates/erreur.html index c3fcde6..740cace 100755 --- a/php/vues/erreur.html +++ b/php/templates/erreur.html @@ -3,7 +3,7 @@ - + Alica - Erreur @@ -14,7 +14,7 @@

{{value}}

{% endfor %} {% endif %} -
+
diff --git a/php/vues/inscription.html b/php/templates/inscription.html similarity index 91% rename from php/vues/inscription.html rename to php/templates/inscription.html index cfee55a..b86bcea 100755 --- a/php/vues/inscription.html +++ b/php/templates/inscription.html @@ -4,7 +4,7 @@ Alica - Inscription - +
@@ -45,7 +45,7 @@
-
+
diff --git a/php/vendor/composer/installed.php b/php/vendor/composer/installed.php index 9500923..295225e 100644 --- a/php/vendor/composer/installed.php +++ b/php/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => '__root__', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '68bdbc2afe49996b3ceec196c42f5e25b3edec96', + 'reference' => 'ca79f102cff2316dd789a28ba980fe14643acaa0', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -13,7 +13,7 @@ '__root__' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '68bdbc2afe49996b3ceec196c42f5e25b3edec96', + 'reference' => 'ca79f102cff2316dd789a28ba980fe14643acaa0', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/php/vues/.DS_Store b/php/vues/.DS_Store deleted file mode 100755 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0