@ -1,3 +1,3 @@
|
|||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteRule . index.php [L]
|
RewriteRule . index.php [L]
|
@ -0,0 +1,2 @@
|
|||||||
|
#n:public
|
||||||
|
!<md> [676280, 0, null, null, -2147483648, -2147483648]
|
@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="MaterialThemeProjectNewConfig">
|
|
||||||
<option name="metadata">
|
|
||||||
<MTProjectMetadataState>
|
|
||||||
<option name="migrated" value="true" />
|
|
||||||
<option name="pristineConfig" value="false" />
|
|
||||||
<option name="userId" value="-1562669c:19061473cbf:-7ffe" />
|
|
||||||
</MTProjectMetadataState>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="MessDetectorOptionsConfiguration">
|
||||||
|
<option name="transferred" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="PHPCSFixerOptionsConfiguration">
|
||||||
|
<option name="transferred" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="PHPCodeSnifferOptionsConfiguration">
|
||||||
|
<option name="highlightLevel" value="WARNING" />
|
||||||
|
<option name="transferred" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="PhpIncludePathManager">
|
||||||
|
<include_path>
|
||||||
|
<path value="$PROJECT_DIR$/vendor/composer" />
|
||||||
|
<path value="$PROJECT_DIR$/vendor/altorouter/altorouter" />
|
||||||
|
<path value="$PROJECT_DIR$/vendor/twig/twig" />
|
||||||
|
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
|
||||||
|
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-php81" />
|
||||||
|
<path value="$PROJECT_DIR$/vendor/symfony/deprecation-contracts" />
|
||||||
|
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
|
||||||
|
</include_path>
|
||||||
|
</component>
|
||||||
|
<component name="PhpProjectSharedConfiguration" php_language_level="8.3" />
|
||||||
|
<component name="PhpStanOptionsConfiguration">
|
||||||
|
<option name="transferred" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="PsalmOptionsConfiguration">
|
||||||
|
<option name="transferred" value="true" />
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -1,123 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="AutoImportSettings">
|
|
||||||
<option name="autoReloadType" value="SELECTIVE" />
|
|
||||||
</component>
|
|
||||||
<component name="ChangeListManager">
|
|
||||||
<list default="true" id="afa12d51-331f-4dbc-a297-7289ad4e396d" name="Changes" comment="">
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/Controleur/QuizController.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Controleur/QuizController.php" afterDir="false" />
|
|
||||||
</list>
|
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
||||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
||||||
</component>
|
|
||||||
<component name="ComposerSettings" synchronizationState="SYNCHRONIZE">
|
|
||||||
<pharConfigPath>$PROJECT_DIR$/composer.json</pharConfigPath>
|
|
||||||
<execution />
|
|
||||||
</component>
|
|
||||||
<component name="Git.Settings">
|
|
||||||
<excluded-from-favorite>
|
|
||||||
<branch-storage>
|
|
||||||
<map>
|
|
||||||
<entry type="LOCAL">
|
|
||||||
<value>
|
|
||||||
<list>
|
|
||||||
<branch-info repo="$PROJECT_DIR$" source="master" />
|
|
||||||
</list>
|
|
||||||
</value>
|
|
||||||
</entry>
|
|
||||||
</map>
|
|
||||||
</branch-storage>
|
|
||||||
</excluded-from-favorite>
|
|
||||||
<favorite-branches>
|
|
||||||
<branch-storage>
|
|
||||||
<map>
|
|
||||||
<entry type="LOCAL">
|
|
||||||
<value>
|
|
||||||
<list>
|
|
||||||
<branch-info repo="$PROJECT_DIR$" source="reorganisation" />
|
|
||||||
</list>
|
|
||||||
</value>
|
|
||||||
</entry>
|
|
||||||
</map>
|
|
||||||
</branch-storage>
|
|
||||||
</favorite-branches>
|
|
||||||
<option name="RECENT_BRANCH_BY_REPOSITORY">
|
|
||||||
<map>
|
|
||||||
<entry key="$PROJECT_DIR$" value="master" />
|
|
||||||
</map>
|
|
||||||
</option>
|
|
||||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
||||||
</component>
|
|
||||||
<component name="PhpWorkspaceProjectConfiguration" interpreter_name="/opt/homebrew/Cellar/php/8.3.8/bin/php">
|
|
||||||
<include_path>
|
|
||||||
<path value="$PROJECT_DIR$/vendor/composer" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/altorouter/altorouter" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/twig/twig" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-php81" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/symfony/deprecation-contracts" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
|
|
||||||
</include_path>
|
|
||||||
</component>
|
|
||||||
<component name="ProjectColorInfo">{
|
|
||||||
"customColor": "",
|
|
||||||
"associatedIndex": 4
|
|
||||||
}</component>
|
|
||||||
<component name="ProjectId" id="2oQGGlghI0ydDNgxjOeok3kwC7m" />
|
|
||||||
<component name="ProjectLevelVcsManager">
|
|
||||||
<ConfirmationsSetting value="1" id="Add" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectViewState">
|
|
||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
|
||||||
<option name="showLibraryContents" value="true" />
|
|
||||||
</component>
|
|
||||||
<component name="PropertiesComponent"><![CDATA[{
|
|
||||||
"keyToString": {
|
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
||||||
"git-widget-placeholder": "quizPart",
|
|
||||||
"node.js.detected.package.eslint": "true",
|
|
||||||
"node.js.detected.package.tslint": "true",
|
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
|
||||||
"nodejs_package_manager_path": "npm",
|
|
||||||
"vue.rearranger.settings.migration": "true"
|
|
||||||
},
|
|
||||||
"keyToStringList": {
|
|
||||||
"DatabaseDriversLRU": [
|
|
||||||
"postgresql"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}]]></component>
|
|
||||||
<component name="RecentsManager">
|
|
||||||
<key name="MoveFile.RECENT_KEYS">
|
|
||||||
<recent name="$PROJECT_DIR$/vue/templates" />
|
|
||||||
</key>
|
|
||||||
</component>
|
|
||||||
<component name="SharedIndexes">
|
|
||||||
<attachedChunks>
|
|
||||||
<set>
|
|
||||||
<option value="bundled-js-predefined-1d06a55b98c1-0b3e54e931b4-JavaScript-PS-241.18034.69" />
|
|
||||||
<option value="bundled-php-predefined-ba97393d7c68-48a1a656d44e-com.jetbrains.php.sharedIndexes-PS-241.18034.69" />
|
|
||||||
</set>
|
|
||||||
</attachedChunks>
|
|
||||||
</component>
|
|
||||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
|
||||||
<component name="TaskManager">
|
|
||||||
<task active="true" id="Default" summary="Default task">
|
|
||||||
<changelist id="afa12d51-331f-4dbc-a297-7289ad4e396d" name="Changes" comment="" />
|
|
||||||
<created>1730794293135</created>
|
|
||||||
<option name="number" value="Default" />
|
|
||||||
<option name="presentableId" value="Default" />
|
|
||||||
<updated>1730794293135</updated>
|
|
||||||
<workItem from="1730794294713" duration="2741000" />
|
|
||||||
<workItem from="1730797544484" duration="43165000" />
|
|
||||||
</task>
|
|
||||||
<servers />
|
|
||||||
</component>
|
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
|
||||||
<option name="version" value="3" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -0,0 +1,127 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Twig\Environment;
|
||||||
|
use Twig\Error\LoaderError;
|
||||||
|
use Twig\Error\RuntimeError;
|
||||||
|
use Twig\Extension\CoreExtension;
|
||||||
|
use Twig\Extension\SandboxExtension;
|
||||||
|
use Twig\Markup;
|
||||||
|
use Twig\Sandbox\SecurityError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
||||||
|
use Twig\Source;
|
||||||
|
use Twig\Template;
|
||||||
|
use Twig\TemplateWrapper;
|
||||||
|
|
||||||
|
/* signin2.html.twig */
|
||||||
|
class __TwigTemplate_487259351c054531e82d7ec374d515ee extends Template
|
||||||
|
{
|
||||||
|
private Source $source;
|
||||||
|
/**
|
||||||
|
* @var array<string, Template>
|
||||||
|
*/
|
||||||
|
private array $macros = [];
|
||||||
|
|
||||||
|
public function __construct(Environment $env)
|
||||||
|
{
|
||||||
|
parent::__construct($env);
|
||||||
|
|
||||||
|
$this->source = $this->getSourceContext();
|
||||||
|
|
||||||
|
$this->parent = false;
|
||||||
|
|
||||||
|
$this->blocks = [
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
||||||
|
{
|
||||||
|
$macros = $this->macros;
|
||||||
|
// line 1
|
||||||
|
yield "<!DOCTYPE html>
|
||||||
|
<html lang=\"fr\">
|
||||||
|
<head>
|
||||||
|
<meta charset=\"UTF-8\">
|
||||||
|
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
||||||
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"../public/styles/styleSignin.css\" media=\"screen\">
|
||||||
|
<title>Wiki Fantasy : Inscription</title>
|
||||||
|
<link id=\"favicon\" rel=\"icon\" href=\"../images/iconeSombre.ico\"> <!-- Par défaut sombre -->
|
||||||
|
<link href=\"https://fonts.googleapis.com/css2?family=Lemon&display=swap\" rel=\"stylesheet\">
|
||||||
|
<script defer src=\"../public/script/theme-toggle.js\"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class=\"container\">
|
||||||
|
<div class=\"header\">
|
||||||
|
<div class=\"nav\">
|
||||||
|
<a href=\"favorite.html\"><img src=\"../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\"></a>
|
||||||
|
<img id=\"theme-icon\" src=\"../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
||||||
|
<a href=\"quiz.html\"><img src=\"../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\"></a>
|
||||||
|
</div>
|
||||||
|
<div class=\"logo\">
|
||||||
|
<a href=\"accueil.html\"><img src=\"../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\"></a>
|
||||||
|
</div>
|
||||||
|
<div class=\"user\">
|
||||||
|
<img src=\"../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h1>▶ S'inscrazeazeazeire ◀</h1>
|
||||||
|
<form method=\"post\">
|
||||||
|
<div class=\"signin\">
|
||||||
|
<div class=\"DivId\">
|
||||||
|
<p>Identifiant *</p>
|
||||||
|
<input type=\"text\" class=\"champ\" id=\"pseudo\" name=\"pseudo\" placeholder=\"Id\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"DivEmail\">
|
||||||
|
<p>Email *</p>
|
||||||
|
<input type=\"email\" class=\"champ\" id=\"email\" name=\"email\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"mdp\">
|
||||||
|
<p>Mot de passe *</p>
|
||||||
|
<input type=\"password\" class=\"champ\" id=\"mdp\" name=\"mdp\" required placeholder=\"Entrez votre mot de passe\"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"confmdp\">
|
||||||
|
<p>Confirmer mot de passe *</p>
|
||||||
|
<input type=\"password\" class=\"champ\" id=\"cmdp\" name=\"cmdp\" placeholder=\"Confirmez votre mot de passe\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"imgprof\">
|
||||||
|
<p>Image *</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"confirmer\">
|
||||||
|
<input type=\"submit\" class=\"btn\" value=\"Inscription\" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>";
|
||||||
|
yield from [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getTemplateName(): string
|
||||||
|
{
|
||||||
|
return "signin2.html.twig";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getDebugInfo(): array
|
||||||
|
{
|
||||||
|
return array ( 42 => 1,);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSourceContext(): Source
|
||||||
|
{
|
||||||
|
return new Source("", "signin.html.twig", "/Users/kiem/Documents/WikiFantasy/WF-Website/vue/templates/signin2.html.twig");
|
||||||
|
}
|
||||||
|
}
|
@ -1,167 +1,167 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Twig\Environment;
|
use Twig\Environment;
|
||||||
use Twig\Error\LoaderError;
|
use Twig\Error\LoaderError;
|
||||||
use Twig\Error\RuntimeError;
|
use Twig\Error\RuntimeError;
|
||||||
use Twig\Extension\CoreExtension;
|
use Twig\Extension\CoreExtension;
|
||||||
use Twig\Extension\SandboxExtension;
|
use Twig\Extension\SandboxExtension;
|
||||||
use Twig\Markup;
|
use Twig\Markup;
|
||||||
use Twig\Sandbox\SecurityError;
|
use Twig\Sandbox\SecurityError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedTagError;
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
||||||
use Twig\Source;
|
use Twig\Source;
|
||||||
use Twig\Template;
|
use Twig\Template;
|
||||||
use Twig\TemplateWrapper;
|
use Twig\TemplateWrapper;
|
||||||
|
|
||||||
/* quiz.html.twig */
|
/* quiz.html.twig */
|
||||||
class __TwigTemplate_eb15b3c7b3e1c48f1a2ebec5d9eb6685 extends Template
|
class __TwigTemplate_eb15b3c7b3e1c48f1a2ebec5d9eb6685 extends Template
|
||||||
{
|
{
|
||||||
private Source $source;
|
private Source $source;
|
||||||
/**
|
/**
|
||||||
* @var array<string, Template>
|
* @var array<string, Template>
|
||||||
*/
|
*/
|
||||||
private array $macros = [];
|
private array $macros = [];
|
||||||
|
|
||||||
public function __construct(Environment $env)
|
public function __construct(Environment $env)
|
||||||
{
|
{
|
||||||
parent::__construct($env);
|
parent::__construct($env);
|
||||||
|
|
||||||
$this->source = $this->getSourceContext();
|
$this->source = $this->getSourceContext();
|
||||||
|
|
||||||
$this->parent = false;
|
$this->parent = false;
|
||||||
|
|
||||||
$this->blocks = [
|
$this->blocks = [
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function doDisplay(array $context, array $blocks = []): iterable
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
||||||
{
|
{
|
||||||
$macros = $this->macros;
|
$macros = $this->macros;
|
||||||
// line 1
|
// line 1
|
||||||
yield "<!DOCTYPE html>
|
yield "<!DOCTYPE html>
|
||||||
<html lang=\"fr\">
|
<html lang=\"fr\">
|
||||||
<head>
|
<head>
|
||||||
<meta charset=\"UTF-8\">
|
<meta charset=\"UTF-8\">
|
||||||
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
||||||
<title>Wiki Fantasy : Quiz</title>
|
<title>Wiki Fantasy : Quiz</title>
|
||||||
<link id=\"favicon\" rel=\"icon\" href=\"../../images/iconeSombre.ico\"> <!-- Par défaut sombre -->
|
<link id=\"favicon\" rel=\"icon\" href=\"../../images/iconeSombre.ico\"> <!-- Par défaut sombre -->
|
||||||
<link rel=\"stylesheet\" href=\"../../public/styles/styleQuiz.css\">
|
<link rel=\"stylesheet\" href=\"../../public/styles/styleQuiz.css\">
|
||||||
<script defer src=\"../../public/script/theme-toggle.js\"></script>
|
<script defer src=\"../../public/script/theme-toggle.js\"></script>
|
||||||
<script>
|
<script>
|
||||||
// Timer pour 5 minutes
|
// Timer pour 5 minutes
|
||||||
var timeLeft = 300;
|
var timeLeft = 300;
|
||||||
function countdown() {
|
function countdown() {
|
||||||
var timerDisplay = document.getElementById(\"timer\");
|
var timerDisplay = document.getElementById(\"timer\");
|
||||||
if (timeLeft <= 0) {
|
if (timeLeft <= 0) {
|
||||||
document.getElementById(\"quizForm\").submit();
|
document.getElementById(\"quizForm\").submit();
|
||||||
} else {
|
} else {
|
||||||
timerDisplay.innerHTML = timeLeft + \" seconds left\";
|
timerDisplay.innerHTML = timeLeft + \" seconds left\";
|
||||||
timeLeft -= 1;
|
timeLeft -= 1;
|
||||||
setTimeout(countdown, 1000);
|
setTimeout(countdown, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
window.onload = countdown;
|
window.onload = countdown;
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class=\"header\">
|
<div class=\"header\">
|
||||||
<div class=\"nav\">
|
<div class=\"nav\">
|
||||||
<a href=\"../favorite.html\"><img src=\"../../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\"></a>
|
<a href=\"../favorite.html\"><img src=\"../../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\"></a>
|
||||||
<img id=\"theme-icon\" src=\"../../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
<img id=\"theme-icon\" src=\"../../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
||||||
<img src=\"../../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\">
|
<img src=\"../../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\">
|
||||||
</div>
|
</div>
|
||||||
<div class=\"logo\">
|
<div class=\"logo\">
|
||||||
<img src=\"../../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\">
|
<img src=\"../../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\">
|
||||||
</div>
|
</div>
|
||||||
<div class=\"user\">
|
<div class=\"user\">
|
||||||
<img src=\"../../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\">
|
<img src=\"../../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<h1>▶ Quiz ◀</h1>
|
<h1>▶ Quiz ◀</h1>
|
||||||
<div class=\"quiz\">
|
<div class=\"quiz\">
|
||||||
<h2> ";
|
<h2> ";
|
||||||
// line 44
|
// line 44
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["question"] ?? null), "question", [], "any", false, false, false, 44), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["question"] ?? null), "question", [], "any", false, false, false, 44), "html", null, true);
|
||||||
yield " </h2>
|
yield " </h2>
|
||||||
<a id=\"timer\"> 300 seconds left .. </a>
|
<a id=\"timer\"> 300 seconds left .. </a>
|
||||||
|
|
||||||
<form id=\"quizForm\" method=\"POST\">
|
<form id=\"quizForm\" method=\"POST\">
|
||||||
<div class=\"answers\">
|
<div class=\"answers\">
|
||||||
<button class=\"answer\" name=\"answera\" value=\"A-";
|
<button class=\"answer\" name=\"answera\" value=\"A-";
|
||||||
// line 49
|
// line 49
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["id"] ?? null), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["id"] ?? null), "html", null, true);
|
||||||
yield "\">
|
yield "\">
|
||||||
";
|
";
|
||||||
// line 50
|
// line 50
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["question"] ?? null), "answera", [], "any", false, false, false, 50), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["question"] ?? null), "answera", [], "any", false, false, false, 50), "html", null, true);
|
||||||
yield "
|
yield "
|
||||||
</button>
|
</button>
|
||||||
<button class=\"answer\" name=\"answerb\" value=\"B-";
|
<button class=\"answer\" name=\"answerb\" value=\"B-";
|
||||||
// line 52
|
// line 52
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["id"] ?? null), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["id"] ?? null), "html", null, true);
|
||||||
yield "\">
|
yield "\">
|
||||||
";
|
";
|
||||||
// line 53
|
// line 53
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["question"] ?? null), "answerb", [], "any", false, false, false, 53), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["question"] ?? null), "answerb", [], "any", false, false, false, 53), "html", null, true);
|
||||||
yield "
|
yield "
|
||||||
</button>
|
</button>
|
||||||
<button class=\"answer\" name=\"answerc\" value=\"C-";
|
<button class=\"answer\" name=\"answerc\" value=\"C-";
|
||||||
// line 55
|
// line 55
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["id"] ?? null), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["id"] ?? null), "html", null, true);
|
||||||
yield "\">
|
yield "\">
|
||||||
";
|
";
|
||||||
// line 56
|
// line 56
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["question"] ?? null), "answerc", [], "any", false, false, false, 56), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["question"] ?? null), "answerc", [], "any", false, false, false, 56), "html", null, true);
|
||||||
yield "
|
yield "
|
||||||
</button>
|
</button>
|
||||||
<button class=\"answer\" name=\"answerd\" value=\"D-";
|
<button class=\"answer\" name=\"answerd\" value=\"D-";
|
||||||
// line 58
|
// line 58
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["id"] ?? null), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["id"] ?? null), "html", null, true);
|
||||||
yield "\">
|
yield "\">
|
||||||
";
|
";
|
||||||
// line 59
|
// line 59
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["question"] ?? null), "answerd", [], "any", false, false, false, 59), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["question"] ?? null), "answerd", [], "any", false, false, false, 59), "html", null, true);
|
||||||
yield "
|
yield "
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<input type=\"hidden\" name=\"action\" value=\"canswer\">
|
<input type=\"hidden\" name=\"action\" value=\"canswer\">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
";
|
";
|
||||||
yield from [];
|
yield from [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function getTemplateName(): string
|
public function getTemplateName(): string
|
||||||
{
|
{
|
||||||
return "quiz.html.twig";
|
return "quiz.html.twig";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function isTraitable(): bool
|
public function isTraitable(): bool
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function getDebugInfo(): array
|
public function getDebugInfo(): array
|
||||||
{
|
{
|
||||||
return array ( 126 => 59, 122 => 58, 117 => 56, 113 => 55, 108 => 53, 104 => 52, 99 => 50, 95 => 49, 87 => 44, 42 => 1,);
|
return array ( 126 => 59, 122 => 58, 117 => 56, 113 => 55, 108 => 53, 104 => 52, 99 => 50, 95 => 49, 87 => 44, 42 => 1,);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSourceContext(): Source
|
public function getSourceContext(): Source
|
||||||
{
|
{
|
||||||
return new Source("", "quiz.html.twig", "/Users/kiem/Documents/WikiFantasy/WF-Website/vue/templates/quiz.html.twig");
|
return new Source("", "quiz.html.twig", "/Users/kiem/Documents/WikiFantasy/WF-Website/vue/templates/quiz.html.twig");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,115 +1,115 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Twig\Environment;
|
use Twig\Environment;
|
||||||
use Twig\Error\LoaderError;
|
use Twig\Error\LoaderError;
|
||||||
use Twig\Error\RuntimeError;
|
use Twig\Error\RuntimeError;
|
||||||
use Twig\Extension\CoreExtension;
|
use Twig\Extension\CoreExtension;
|
||||||
use Twig\Extension\SandboxExtension;
|
use Twig\Extension\SandboxExtension;
|
||||||
use Twig\Markup;
|
use Twig\Markup;
|
||||||
use Twig\Sandbox\SecurityError;
|
use Twig\Sandbox\SecurityError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedTagError;
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
||||||
use Twig\Source;
|
use Twig\Source;
|
||||||
use Twig\Template;
|
use Twig\Template;
|
||||||
use Twig\TemplateWrapper;
|
use Twig\TemplateWrapper;
|
||||||
|
|
||||||
/* signin.html */
|
/* signin.html */
|
||||||
class __TwigTemplate_d8d8ee303bb01e4f719db1d13398adc0 extends Template
|
class __TwigTemplate_d8d8ee303bb01e4f719db1d13398adc0 extends Template
|
||||||
{
|
{
|
||||||
private Source $source;
|
private Source $source;
|
||||||
/**
|
/**
|
||||||
* @var array<string, Template>
|
* @var array<string, Template>
|
||||||
*/
|
*/
|
||||||
private array $macros = [];
|
private array $macros = [];
|
||||||
|
|
||||||
public function __construct(Environment $env)
|
public function __construct(Environment $env)
|
||||||
{
|
{
|
||||||
parent::__construct($env);
|
parent::__construct($env);
|
||||||
|
|
||||||
$this->source = $this->getSourceContext();
|
$this->source = $this->getSourceContext();
|
||||||
|
|
||||||
$this->parent = false;
|
$this->parent = false;
|
||||||
|
|
||||||
$this->blocks = [
|
$this->blocks = [
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function doDisplay(array $context, array $blocks = []): iterable
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
||||||
{
|
{
|
||||||
$macros = $this->macros;
|
$macros = $this->macros;
|
||||||
// line 1
|
// line 1
|
||||||
yield " <div class=\"container\">
|
yield " <div class=\"container\">
|
||||||
<div class=\"header\">
|
<div class=\"header\">
|
||||||
<div class=\"nav\">
|
<div class=\"nav\">
|
||||||
<a href=\"favorite.html\"><img src=\"../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\"></a>
|
<a href=\"favorite.html\"><img src=\"../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\"></a>
|
||||||
<img id=\"theme-icon\" src=\"../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
<img id=\"theme-icon\" src=\"../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
||||||
<a href=\"quiz.html\"><img src=\"../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\"></a>
|
<a href=\"quiz.html\"><img src=\"../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\"></a>
|
||||||
</div>
|
</div>
|
||||||
<div class=\"logo\">
|
<div class=\"logo\">
|
||||||
<a href=\"accueil.html\"><img src=\"../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\"></a>
|
<a href=\"accueil.html\"><img src=\"../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\"></a>
|
||||||
</div>
|
</div>
|
||||||
<div class=\"user\">
|
<div class=\"user\">
|
||||||
<img src=\"../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\">
|
<img src=\"../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h1>▶ S'inscrire ◀</h1>
|
<h1>▶ S'inscrire ◀</h1>
|
||||||
<form action=\"../script/signin.php\" method=\"post\">
|
<form action=\"../script/signin.php\" method=\"post\">
|
||||||
<div class=\"signin\">
|
<div class=\"signin\">
|
||||||
<div class=\"DivId\">
|
<div class=\"DivId\">
|
||||||
<p>Identifiant *</p>
|
<p>Identifiant *</p>
|
||||||
<input type=\"text\" class=\"champ\" id=\"name\" name=\"name\" required/>
|
<input type=\"text\" class=\"champ\" id=\"name\" name=\"name\" required/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class=\"DivEmail\">
|
<div class=\"DivEmail\">
|
||||||
<p>Email *</p>
|
<p>Email *</p>
|
||||||
<input type=\"email\" class=\"champ\" id=\"email\" name=\"email\" required/>
|
<input type=\"email\" class=\"champ\" id=\"email\" name=\"email\" required/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class=\"mdp\">
|
<div class=\"mdp\">
|
||||||
<p>Mot de passe *</p>
|
<p>Mot de passe *</p>
|
||||||
<input type=\"password\" class=\"champ\" id=\"pswd\" name=\"pswd\" required/>
|
<input type=\"password\" class=\"champ\" id=\"pswd\" name=\"pswd\" required/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class=\"confmdp\">
|
<div class=\"confmdp\">
|
||||||
<p>Confirmer mot de passe *</p>
|
<p>Confirmer mot de passe *</p>
|
||||||
<input type=\"password\" class=\"champ\" id=\"confpswd\" name=\"confpswd\" required/>
|
<input type=\"password\" class=\"champ\" id=\"confpswd\" name=\"confpswd\" required/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class=\"imgprof\">
|
<div class=\"imgprof\">
|
||||||
<p>Image *</p>
|
<p>Image *</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class=\"confirmer\">
|
<div class=\"confirmer\">
|
||||||
<input type=\"submit\" class=\"btn\" value=\"Inscription\" />
|
<input type=\"submit\" class=\"btn\" value=\"Inscription\" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>";
|
</html>";
|
||||||
yield from [];
|
yield from [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function getTemplateName(): string
|
public function getTemplateName(): string
|
||||||
{
|
{
|
||||||
return "signin.html";
|
return "signin.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function getDebugInfo(): array
|
public function getDebugInfo(): array
|
||||||
{
|
{
|
||||||
return array ( 42 => 1,);
|
return array ( 42 => 1,);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSourceContext(): Source
|
public function getSourceContext(): Source
|
||||||
{
|
{
|
||||||
return new Source("", "signin.html", "/home/www/lebeaulato/public_html/WF-Website/vue/templates/signin.html");
|
return new Source("", "signin.html", "/home/www/lebeaulato/public_html/WF-Website/vue/templates/signin.html");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,90 +1,90 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Twig\Environment;
|
use Twig\Environment;
|
||||||
use Twig\Error\LoaderError;
|
use Twig\Error\LoaderError;
|
||||||
use Twig\Error\RuntimeError;
|
use Twig\Error\RuntimeError;
|
||||||
use Twig\Extension\CoreExtension;
|
use Twig\Extension\CoreExtension;
|
||||||
use Twig\Extension\SandboxExtension;
|
use Twig\Extension\SandboxExtension;
|
||||||
use Twig\Markup;
|
use Twig\Markup;
|
||||||
use Twig\Sandbox\SecurityError;
|
use Twig\Sandbox\SecurityError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedTagError;
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
||||||
use Twig\Source;
|
use Twig\Source;
|
||||||
use Twig\Template;
|
use Twig\Template;
|
||||||
use Twig\TemplateWrapper;
|
use Twig\TemplateWrapper;
|
||||||
|
|
||||||
/* head.html.twig */
|
/* head.html.twig */
|
||||||
class __TwigTemplate_eb23fe14e9c99cb057475369e77b2ea7 extends Template
|
class __TwigTemplate_eb23fe14e9c99cb057475369e77b2ea7 extends Template
|
||||||
{
|
{
|
||||||
private Source $source;
|
private Source $source;
|
||||||
/**
|
/**
|
||||||
* @var array<string, Template>
|
* @var array<string, Template>
|
||||||
*/
|
*/
|
||||||
private array $macros = [];
|
private array $macros = [];
|
||||||
|
|
||||||
public function __construct(Environment $env)
|
public function __construct(Environment $env)
|
||||||
{
|
{
|
||||||
parent::__construct($env);
|
parent::__construct($env);
|
||||||
|
|
||||||
$this->source = $this->getSourceContext();
|
$this->source = $this->getSourceContext();
|
||||||
|
|
||||||
$this->parent = false;
|
$this->parent = false;
|
||||||
|
|
||||||
$this->blocks = [
|
$this->blocks = [
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function doDisplay(array $context, array $blocks = []): iterable
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
||||||
{
|
{
|
||||||
$macros = $this->macros;
|
$macros = $this->macros;
|
||||||
// line 1
|
// line 1
|
||||||
yield "<!DOCTYPE html>
|
yield "<!DOCTYPE html>
|
||||||
<html lang=\"fr\">
|
<html lang=\"fr\">
|
||||||
<head>
|
<head>
|
||||||
<meta charset=\"UTF-8\">
|
<meta charset=\"UTF-8\">
|
||||||
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
||||||
<title>";
|
<title>";
|
||||||
// line 6
|
// line 6
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["title"] ?? null), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["title"] ?? null), "html", null, true);
|
||||||
yield "</title>
|
yield "</title>
|
||||||
<link rel=\"stylesheet\" href=\"";
|
<link rel=\"stylesheet\" href=\"";
|
||||||
// line 7
|
// line 7
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["style"] ?? null), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["style"] ?? null), "html", null, true);
|
||||||
yield "\">
|
yield "\">
|
||||||
<link id=\"favicon\" rel=\"icon\" href=\"../../public/images/iconeSombre.ico\" />
|
<link id=\"favicon\" rel=\"icon\" href=\"../../public/images/iconeSombre.ico\" />
|
||||||
<script src=\"../public/script/theme-toggle.js\"></script>
|
<script src=\"../public/script/theme-toggle.js\"></script>
|
||||||
</head>
|
</head>
|
||||||
";
|
";
|
||||||
yield from [];
|
yield from [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function getTemplateName(): string
|
public function getTemplateName(): string
|
||||||
{
|
{
|
||||||
return "head.html.twig";
|
return "head.html.twig";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function isTraitable(): bool
|
public function isTraitable(): bool
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function getDebugInfo(): array
|
public function getDebugInfo(): array
|
||||||
{
|
{
|
||||||
return array ( 53 => 7, 49 => 6, 42 => 1,);
|
return array ( 53 => 7, 49 => 6, 42 => 1,);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSourceContext(): Source
|
public function getSourceContext(): Source
|
||||||
{
|
{
|
||||||
return new Source("", "head.html.twig", "/home/www/lebeaulato/public_html/WF-Website/vue/templates/head.html.twig");
|
return new Source("", "head.html.twig", "/home/www/lebeaulato/public_html/WF-Website/vue/templates/head.html.twig");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,78 +1,78 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Twig\Environment;
|
use Twig\Environment;
|
||||||
use Twig\Error\LoaderError;
|
use Twig\Error\LoaderError;
|
||||||
use Twig\Error\RuntimeError;
|
use Twig\Error\RuntimeError;
|
||||||
use Twig\Extension\CoreExtension;
|
use Twig\Extension\CoreExtension;
|
||||||
use Twig\Extension\SandboxExtension;
|
use Twig\Extension\SandboxExtension;
|
||||||
use Twig\Markup;
|
use Twig\Markup;
|
||||||
use Twig\Sandbox\SecurityError;
|
use Twig\Sandbox\SecurityError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedTagError;
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
||||||
use Twig\Source;
|
use Twig\Source;
|
||||||
use Twig\Template;
|
use Twig\Template;
|
||||||
use Twig\TemplateWrapper;
|
use Twig\TemplateWrapper;
|
||||||
|
|
||||||
/* bandeau.html.twig */
|
/* bandeau.html.twig */
|
||||||
class __TwigTemplate_012dc2aef67e620d386f46e331598640 extends Template
|
class __TwigTemplate_012dc2aef67e620d386f46e331598640 extends Template
|
||||||
{
|
{
|
||||||
private Source $source;
|
private Source $source;
|
||||||
/**
|
/**
|
||||||
* @var array<string, Template>
|
* @var array<string, Template>
|
||||||
*/
|
*/
|
||||||
private array $macros = [];
|
private array $macros = [];
|
||||||
|
|
||||||
public function __construct(Environment $env)
|
public function __construct(Environment $env)
|
||||||
{
|
{
|
||||||
parent::__construct($env);
|
parent::__construct($env);
|
||||||
|
|
||||||
$this->source = $this->getSourceContext();
|
$this->source = $this->getSourceContext();
|
||||||
|
|
||||||
$this->parent = false;
|
$this->parent = false;
|
||||||
|
|
||||||
$this->blocks = [
|
$this->blocks = [
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function doDisplay(array $context, array $blocks = []): iterable
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
||||||
{
|
{
|
||||||
$macros = $this->macros;
|
$macros = $this->macros;
|
||||||
// line 1
|
// line 1
|
||||||
yield "<div class=\"header\">
|
yield "<div class=\"header\">
|
||||||
<div class=\"nav\">
|
<div class=\"nav\">
|
||||||
<a href=\"favorite.html\"><img src=\"../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\"></a>
|
<a href=\"favorite.html\"><img src=\"../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\"></a>
|
||||||
<img id=\"theme-icon\" src=\"../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
<img id=\"theme-icon\" src=\"../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
||||||
<a href=\"quiz.html\"><img src=\"../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\"></a>
|
<a href=\"quiz.html\"><img src=\"../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\"></a>
|
||||||
</div>
|
</div>
|
||||||
<div class=\"logo\">
|
<div class=\"logo\">
|
||||||
<a href=\"accueil.html\"><img src=\"../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\"></a>
|
<a href=\"accueil.html\"><img src=\"../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\"></a>
|
||||||
</div>
|
</div>
|
||||||
<div class=\"user\">
|
<div class=\"user\">
|
||||||
<a href=\"profil.html\"><img src=\"../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\"></a>
|
<a href=\"profil.html\"><img src=\"../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>";
|
</div>";
|
||||||
yield from [];
|
yield from [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function getTemplateName(): string
|
public function getTemplateName(): string
|
||||||
{
|
{
|
||||||
return "bandeau.html.twig";
|
return "bandeau.html.twig";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function getDebugInfo(): array
|
public function getDebugInfo(): array
|
||||||
{
|
{
|
||||||
return array ( 42 => 1,);
|
return array ( 42 => 1,);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSourceContext(): Source
|
public function getSourceContext(): Source
|
||||||
{
|
{
|
||||||
return new Source("", "bandeau.html.twig", "/home/www/lebeaulato/public_html/WF-Website/vue/templates/bandeau.html.twig");
|
return new Source("", "bandeau.html.twig", "/home/www/lebeaulato/public_html/WF-Website/vue/templates/bandeau.html.twig");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,144 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Twig\Environment;
|
||||||
|
use Twig\Error\LoaderError;
|
||||||
|
use Twig\Error\RuntimeError;
|
||||||
|
use Twig\Extension\CoreExtension;
|
||||||
|
use Twig\Extension\SandboxExtension;
|
||||||
|
use Twig\Markup;
|
||||||
|
use Twig\Sandbox\SecurityError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
||||||
|
use Twig\Source;
|
||||||
|
use Twig\Template;
|
||||||
|
use Twig\TemplateWrapper;
|
||||||
|
|
||||||
|
/* signin4.html.twig */
|
||||||
|
class __TwigTemplate_02d73cdfa663473648587454068306f0 extends Template
|
||||||
|
{
|
||||||
|
private Source $source;
|
||||||
|
/**
|
||||||
|
* @var array<string, Template>
|
||||||
|
*/
|
||||||
|
private array $macros = [];
|
||||||
|
|
||||||
|
public function __construct(Environment $env)
|
||||||
|
{
|
||||||
|
parent::__construct($env);
|
||||||
|
|
||||||
|
$this->source = $this->getSourceContext();
|
||||||
|
|
||||||
|
$this->parent = false;
|
||||||
|
|
||||||
|
$this->blocks = [
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
||||||
|
{
|
||||||
|
$macros = $this->macros;
|
||||||
|
// line 1
|
||||||
|
yield "<!DOCTYPE html>
|
||||||
|
<html lang=\"fr\">
|
||||||
|
<head>
|
||||||
|
<meta charset=\"UTF-8\">
|
||||||
|
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
||||||
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"../public/styles/styleSignin.css\" media=\"screen\">
|
||||||
|
<title>Wiki Fantasy : Inscription</title>
|
||||||
|
<link id=\"favicon\" rel=\"icon\" href=\"../images/iconeSombre.ico\"> <!-- Par défaut sombre -->
|
||||||
|
<link href=\"https://fonts.googleapis.com/css2?family=Lemon&display=swap\" rel=\"stylesheet\">
|
||||||
|
<script defer src=\"../public/script/theme-toggle.js\"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class=\"container\">
|
||||||
|
<div class=\"header\">
|
||||||
|
<div class=\"nav\">
|
||||||
|
<a href=\"favorite.html\"><img src=\"../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\"></a>
|
||||||
|
<img id=\"theme-icon\" src=\"../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
||||||
|
<a href=\"quiz.html\"><img src=\"../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\"></a>
|
||||||
|
</div>
|
||||||
|
<div class=\"logo\">
|
||||||
|
<a href=\"accueil.html\"><img src=\"../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\"></a>
|
||||||
|
</div>
|
||||||
|
<div class=\"user\">
|
||||||
|
<img src=\"../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h1>▶ ";
|
||||||
|
// line 28
|
||||||
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["errors"] ?? null), "html", null, true);
|
||||||
|
yield " ◀</h1>
|
||||||
|
<form method=\"post\">
|
||||||
|
<div class=\"signin\">
|
||||||
|
<div class=\"DivId\">
|
||||||
|
<p>Identifiant *</p>
|
||||||
|
<input type=\"text\" class=\"champ\" id=\"pseudo\" name=\"pseudo\" placeholder=\"Id\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"DivEmail\">
|
||||||
|
<p>Email *</p>
|
||||||
|
<input type=\"email\" class=\"champ\" id=\"email\" name=\"email\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"mdp\">
|
||||||
|
<p>Mot de passe *</p>
|
||||||
|
<input type=\"password\" class=\"champ\" id=\"mdp\" name=\"mdp\" required placeholder=\"";
|
||||||
|
// line 43
|
||||||
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["errors"] ?? null), "html", null, true);
|
||||||
|
yield "\"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"confmdp\">
|
||||||
|
<p>Confirmer mot de passe *</p>
|
||||||
|
<input type=\"password\" class=\"champ\" id=\"cmdp\" name=\"cmdp\" placeholder=\"";
|
||||||
|
// line 48
|
||||||
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["errors"] ?? null), "html", null, true);
|
||||||
|
yield "\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"imgprof\">
|
||||||
|
<p>Image *</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"confirmer\">
|
||||||
|
<input type=\"submit\" class=\"btn\" value=\"Inscription\" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>";
|
||||||
|
yield from [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getTemplateName(): string
|
||||||
|
{
|
||||||
|
return "signin4.html.twig";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function isTraitable(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getDebugInfo(): array
|
||||||
|
{
|
||||||
|
return array ( 97 => 48, 89 => 43, 71 => 28, 42 => 1,);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSourceContext(): Source
|
||||||
|
{
|
||||||
|
return new Source("", "signin4.html.twig", "/Users/kiem/Documents/WikiFantasy/WF-Website/vue/templates/signin4.html.twig");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,114 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Twig\Environment;
|
||||||
|
use Twig\Error\LoaderError;
|
||||||
|
use Twig\Error\RuntimeError;
|
||||||
|
use Twig\Extension\CoreExtension;
|
||||||
|
use Twig\Extension\SandboxExtension;
|
||||||
|
use Twig\Markup;
|
||||||
|
use Twig\Sandbox\SecurityError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
||||||
|
use Twig\Source;
|
||||||
|
use Twig\Template;
|
||||||
|
use Twig\TemplateWrapper;
|
||||||
|
|
||||||
|
/* login.html.twig */
|
||||||
|
class __TwigTemplate_07a755596da3dba7ab89ea161b697e55 extends Template
|
||||||
|
{
|
||||||
|
private Source $source;
|
||||||
|
/**
|
||||||
|
* @var array<string, Template>
|
||||||
|
*/
|
||||||
|
private array $macros = [];
|
||||||
|
|
||||||
|
public function __construct(Environment $env)
|
||||||
|
{
|
||||||
|
parent::__construct($env);
|
||||||
|
|
||||||
|
$this->source = $this->getSourceContext();
|
||||||
|
|
||||||
|
$this->parent = false;
|
||||||
|
|
||||||
|
$this->blocks = [
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
||||||
|
{
|
||||||
|
$macros = $this->macros;
|
||||||
|
// line 1
|
||||||
|
yield "<!DOCTYPE html>
|
||||||
|
<html lang=\"fr\">
|
||||||
|
<head>
|
||||||
|
<meta charset=\"UTF-8\">
|
||||||
|
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
||||||
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"../public/styles/styleLogin.css\" media=\"screen\">
|
||||||
|
<title>Wiki Fantasy : Connexion</title>
|
||||||
|
<link id=\"favicon\" rel=\"icon\" href=\"../../images/iconeSombre.ico\"> <!-- Par défaut sombre -->
|
||||||
|
<link href=\"https://fonts.googleapis.com/css2?family=Lemon&display=swap\" rel=\"stylesheet\">
|
||||||
|
<script defer src=\"../public/script/theme-toggle.js\"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class=\"container\">
|
||||||
|
<div class=\"header\">
|
||||||
|
<div class=\"nav\">
|
||||||
|
<img src=\"../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\">
|
||||||
|
<img id=\"theme-icon\" src=\"../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
||||||
|
<img src=\"../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\">
|
||||||
|
</div>
|
||||||
|
<div class=\"logo\">
|
||||||
|
<a href=\"accueil.html\"><img src=\"../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\"></a>
|
||||||
|
</div>
|
||||||
|
<div class=\"user\">
|
||||||
|
<img src=\"../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h1>▶ Connexion ◀</h1>
|
||||||
|
|
||||||
|
<form class=\"login\" method=\"post\">
|
||||||
|
<p> <strong>Identifiant *</strong></p>
|
||||||
|
<input type=\"text\" class=\"connexion\" name=\"pseudo\" id=\"pseudo\" placeholder=\"Entrez votre pseudo ...\" required />
|
||||||
|
|
||||||
|
<p> <strong> Mot de passe *</strong></p>
|
||||||
|
<input type=\"password\" class=\"connexion\" name=\"mdp\" id=\"mdp\" placeholder=\"Entrez votre mdp ...\" required />
|
||||||
|
|
||||||
|
<div class=\"createAccount\">
|
||||||
|
<p class=\"createAccount\">Vous n'avez pas de compte?</p>
|
||||||
|
<a href=\"signin.html.twig\" class=\"createAccount\">S'incrire</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class=\"buttonSubmitDiv\">
|
||||||
|
<button class=\"buttonSudmite\">Connexion</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>";
|
||||||
|
yield from [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getTemplateName(): string
|
||||||
|
{
|
||||||
|
return "login.html.twig";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getDebugInfo(): array
|
||||||
|
{
|
||||||
|
return array ( 42 => 1,);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSourceContext(): Source
|
||||||
|
{
|
||||||
|
return new Source("", "login.html.twig", "/Users/kiem/Documents/WikiFantasy/WF-Website/vue/templates/login.html.twig");
|
||||||
|
}
|
||||||
|
}
|
@ -1,150 +1,150 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Twig\Environment;
|
use Twig\Environment;
|
||||||
use Twig\Error\LoaderError;
|
use Twig\Error\LoaderError;
|
||||||
use Twig\Error\RuntimeError;
|
use Twig\Error\RuntimeError;
|
||||||
use Twig\Extension\CoreExtension;
|
use Twig\Extension\CoreExtension;
|
||||||
use Twig\Extension\SandboxExtension;
|
use Twig\Extension\SandboxExtension;
|
||||||
use Twig\Markup;
|
use Twig\Markup;
|
||||||
use Twig\Sandbox\SecurityError;
|
use Twig\Sandbox\SecurityError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedTagError;
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
||||||
use Twig\Source;
|
use Twig\Source;
|
||||||
use Twig\Template;
|
use Twig\Template;
|
||||||
use Twig\TemplateWrapper;
|
use Twig\TemplateWrapper;
|
||||||
|
|
||||||
/* quote.html */
|
/* quote.html */
|
||||||
class __TwigTemplate_e80b479dc855245ef0d42a4f64b1f83e extends Template
|
class __TwigTemplate_e80b479dc855245ef0d42a4f64b1f83e extends Template
|
||||||
{
|
{
|
||||||
private Source $source;
|
private Source $source;
|
||||||
/**
|
/**
|
||||||
* @var array<string, Template>
|
* @var array<string, Template>
|
||||||
*/
|
*/
|
||||||
private array $macros = [];
|
private array $macros = [];
|
||||||
|
|
||||||
public function __construct(Environment $env)
|
public function __construct(Environment $env)
|
||||||
{
|
{
|
||||||
parent::__construct($env);
|
parent::__construct($env);
|
||||||
|
|
||||||
$this->source = $this->getSourceContext();
|
$this->source = $this->getSourceContext();
|
||||||
|
|
||||||
$this->parent = false;
|
$this->parent = false;
|
||||||
|
|
||||||
$this->blocks = [
|
$this->blocks = [
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function doDisplay(array $context, array $blocks = []): iterable
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
||||||
{
|
{
|
||||||
$macros = $this->macros;
|
$macros = $this->macros;
|
||||||
// line 1
|
// line 1
|
||||||
yield "<html>
|
yield "<html>
|
||||||
<body>
|
<body>
|
||||||
<div class=\"Quote_container\">
|
<div class=\"Quote_container\">
|
||||||
<img class=\"image_carac\" src=\"";
|
<img class=\"image_carac\" src=\"";
|
||||||
// line 4
|
// line 4
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["srcImg"] ?? null), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["srcImg"] ?? null), "html", null, true);
|
||||||
yield "\" alt=\"";
|
yield "\" alt=\"";
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["nameCarac"] ?? null), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["nameCarac"] ?? null), "html", null, true);
|
||||||
yield "\">
|
yield "\">
|
||||||
<h1 class=\"quote_content\">
|
<h1 class=\"quote_content\">
|
||||||
<strong>
|
<strong>
|
||||||
";
|
";
|
||||||
// line 7
|
// line 7
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["quoteContent"] ?? null), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["quoteContent"] ?? null), "html", null, true);
|
||||||
yield "
|
yield "
|
||||||
</strong>
|
</strong>
|
||||||
</h1>
|
</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
";
|
";
|
||||||
// line 12
|
// line 12
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["sourceName"] ?? null), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["sourceName"] ?? null), "html", null, true);
|
||||||
yield "
|
yield "
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
";
|
";
|
||||||
// line 15
|
// line 15
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["nameCarac"] ?? null), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["nameCarac"] ?? null), "html", null, true);
|
||||||
yield "
|
yield "
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
";
|
";
|
||||||
// line 18
|
// line 18
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["dateSortie"] ?? null), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["dateSortie"] ?? null), "html", null, true);
|
||||||
yield "
|
yield "
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class=\"like\">
|
<div class=\"like\">
|
||||||
<p>
|
<p>
|
||||||
";
|
";
|
||||||
// line 23
|
// line 23
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["nbLike"] ?? null), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["nbLike"] ?? null), "html", null, true);
|
||||||
yield "
|
yield "
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class=\"Comment_Container\">
|
<div class=\"Comment_Container\">
|
||||||
";
|
";
|
||||||
// line 28
|
// line 28
|
||||||
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), ($context["comment"] ?? null)) > 0)) {
|
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), ($context["comment"] ?? null)) > 0)) {
|
||||||
yield " <div>
|
yield " <div>
|
||||||
";
|
";
|
||||||
// line 29
|
// line 29
|
||||||
$context['_parent'] = $context;
|
$context['_parent'] = $context;
|
||||||
$context['_seq'] = CoreExtension::ensureTraversable(($context["comment"] ?? null));
|
$context['_seq'] = CoreExtension::ensureTraversable(($context["comment"] ?? null));
|
||||||
foreach ($context['_seq'] as $context["_key"] => $context["com"]) {
|
foreach ($context['_seq'] as $context["_key"] => $context["com"]) {
|
||||||
// line 30
|
// line 30
|
||||||
yield " <p class=\"userCom\">";
|
yield " <p class=\"userCom\">";
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["com"], "user", [], "any", false, false, false, 30), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["com"], "user", [], "any", false, false, false, 30), "html", null, true);
|
||||||
yield "</p>
|
yield "</p>
|
||||||
<p class=\"com\">";
|
<p class=\"com\">";
|
||||||
// line 31
|
// line 31
|
||||||
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["com"], "content", [], "any", false, false, false, 31), "html", null, true);
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["com"], "content", [], "any", false, false, false, 31), "html", null, true);
|
||||||
yield "</p>
|
yield "</p>
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
$_parent = $context['_parent'];
|
$_parent = $context['_parent'];
|
||||||
unset($context['_seq'], $context['_key'], $context['com'], $context['_parent']);
|
unset($context['_seq'], $context['_key'], $context['com'], $context['_parent']);
|
||||||
$context = array_intersect_key($context, $_parent) + $_parent;
|
$context = array_intersect_key($context, $_parent) + $_parent;
|
||||||
// line 32
|
// line 32
|
||||||
yield " </div>
|
yield " </div>
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
// line 34
|
// line 34
|
||||||
yield " </div>
|
yield " </div>
|
||||||
</body>
|
</body>
|
||||||
</html>";
|
</html>";
|
||||||
yield from [];
|
yield from [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function getTemplateName(): string
|
public function getTemplateName(): string
|
||||||
{
|
{
|
||||||
return "quote.html";
|
return "quote.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function isTraitable(): bool
|
public function isTraitable(): bool
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function getDebugInfo(): array
|
public function getDebugInfo(): array
|
||||||
{
|
{
|
||||||
return array ( 116 => 34, 112 => 32, 104 => 31, 99 => 30, 95 => 29, 91 => 28, 83 => 23, 75 => 18, 69 => 15, 63 => 12, 55 => 7, 47 => 4, 42 => 1,);
|
return array ( 116 => 34, 112 => 32, 104 => 31, 99 => 30, 95 => 29, 91 => 28, 83 => 23, 75 => 18, 69 => 15, 63 => 12, 55 => 7, 47 => 4, 42 => 1,);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSourceContext(): Source
|
public function getSourceContext(): Source
|
||||||
{
|
{
|
||||||
return new Source("", "quote.html", "/home/www/kekentin/public_html/WF/WF-Website/vue/templates/quote.html");
|
return new Source("", "quote.html", "/home/www/kekentin/public_html/WF/WF-Website/vue/templates/quote.html");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,144 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Twig\Environment;
|
||||||
|
use Twig\Error\LoaderError;
|
||||||
|
use Twig\Error\RuntimeError;
|
||||||
|
use Twig\Extension\CoreExtension;
|
||||||
|
use Twig\Extension\SandboxExtension;
|
||||||
|
use Twig\Markup;
|
||||||
|
use Twig\Sandbox\SecurityError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
||||||
|
use Twig\Source;
|
||||||
|
use Twig\Template;
|
||||||
|
use Twig\TemplateWrapper;
|
||||||
|
|
||||||
|
/* signin5.html.twig */
|
||||||
|
class __TwigTemplate_b1f0b539b8066ca5a58d316472e062b0 extends Template
|
||||||
|
{
|
||||||
|
private Source $source;
|
||||||
|
/**
|
||||||
|
* @var array<string, Template>
|
||||||
|
*/
|
||||||
|
private array $macros = [];
|
||||||
|
|
||||||
|
public function __construct(Environment $env)
|
||||||
|
{
|
||||||
|
parent::__construct($env);
|
||||||
|
|
||||||
|
$this->source = $this->getSourceContext();
|
||||||
|
|
||||||
|
$this->parent = false;
|
||||||
|
|
||||||
|
$this->blocks = [
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
||||||
|
{
|
||||||
|
$macros = $this->macros;
|
||||||
|
// line 1
|
||||||
|
yield "<!DOCTYPE html>
|
||||||
|
<html lang=\"fr\">
|
||||||
|
<head>
|
||||||
|
<meta charset=\"UTF-8\">
|
||||||
|
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
||||||
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"../public/styles/styleSignin.css\" media=\"screen\">
|
||||||
|
<title>Wiki Fantasy : Inscription</title>
|
||||||
|
<link id=\"favicon\" rel=\"icon\" href=\"../images/iconeSombre.ico\"> <!-- Par défaut sombre -->
|
||||||
|
<link href=\"https://fonts.googleapis.com/css2?family=Lemon&display=swap\" rel=\"stylesheet\">
|
||||||
|
<script defer src=\"../public/script/theme-toggle.js\"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class=\"container\">
|
||||||
|
<div class=\"header\">
|
||||||
|
<div class=\"nav\">
|
||||||
|
<a href=\"favorite.html\"><img src=\"../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\"></a>
|
||||||
|
<img id=\"theme-icon\" src=\"../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
||||||
|
<a href=\"quiz.html\"><img src=\"../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\"></a>
|
||||||
|
</div>
|
||||||
|
<div class=\"logo\">
|
||||||
|
<a href=\"accueil.html\"><img src=\"../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\"></a>
|
||||||
|
</div>
|
||||||
|
<div class=\"user\">
|
||||||
|
<img src=\"../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h1>▶ ";
|
||||||
|
// line 28
|
||||||
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["test"] ?? null), "html", null, true);
|
||||||
|
yield " ◀</h1>
|
||||||
|
<form method=\"post\">
|
||||||
|
<div class=\"signin\">
|
||||||
|
<div class=\"DivId\">
|
||||||
|
<p>Identifiant *</p>
|
||||||
|
<input type=\"text\" class=\"champ\" id=\"pseudo\" name=\"pseudo\" placeholder=\"Id\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"DivEmail\">
|
||||||
|
<p>Email *</p>
|
||||||
|
<input type=\"email\" class=\"champ\" id=\"email\" name=\"email\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"mdp\">
|
||||||
|
<p>Mot de passe *</p>
|
||||||
|
<input type=\"password\" class=\"champ\" id=\"mdp\" name=\"mdp\" required placeholder=\"";
|
||||||
|
// line 43
|
||||||
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["errors"] ?? null), "html", null, true);
|
||||||
|
yield "\"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"confmdp\">
|
||||||
|
<p>Confirmer mot de passe *</p>
|
||||||
|
<input type=\"password\" class=\"champ\" id=\"cmdp\" name=\"cmdp\" placeholder=\"";
|
||||||
|
// line 48
|
||||||
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["errors"] ?? null), "html", null, true);
|
||||||
|
yield "\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"imgprof\">
|
||||||
|
<p>Image *</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"confirmer\">
|
||||||
|
<input type=\"submit\" class=\"btn\" value=\"Inscription\" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>";
|
||||||
|
yield from [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getTemplateName(): string
|
||||||
|
{
|
||||||
|
return "signin5.html.twig";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function isTraitable(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getDebugInfo(): array
|
||||||
|
{
|
||||||
|
return array ( 97 => 48, 89 => 43, 71 => 28, 42 => 1,);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSourceContext(): Source
|
||||||
|
{
|
||||||
|
return new Source("", "signin5.html.twig", "/Users/kiem/Documents/WikiFantasy/WF-Website/vue/templates/signin5.html.twig");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,144 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Twig\Environment;
|
||||||
|
use Twig\Error\LoaderError;
|
||||||
|
use Twig\Error\RuntimeError;
|
||||||
|
use Twig\Extension\CoreExtension;
|
||||||
|
use Twig\Extension\SandboxExtension;
|
||||||
|
use Twig\Markup;
|
||||||
|
use Twig\Sandbox\SecurityError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
||||||
|
use Twig\Source;
|
||||||
|
use Twig\Template;
|
||||||
|
use Twig\TemplateWrapper;
|
||||||
|
|
||||||
|
/* signin6.html.twig */
|
||||||
|
class __TwigTemplate_7a4f39ed5cce012c6d4972b06e431782 extends Template
|
||||||
|
{
|
||||||
|
private Source $source;
|
||||||
|
/**
|
||||||
|
* @var array<string, Template>
|
||||||
|
*/
|
||||||
|
private array $macros = [];
|
||||||
|
|
||||||
|
public function __construct(Environment $env)
|
||||||
|
{
|
||||||
|
parent::__construct($env);
|
||||||
|
|
||||||
|
$this->source = $this->getSourceContext();
|
||||||
|
|
||||||
|
$this->parent = false;
|
||||||
|
|
||||||
|
$this->blocks = [
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
||||||
|
{
|
||||||
|
$macros = $this->macros;
|
||||||
|
// line 1
|
||||||
|
yield "<!DOCTYPE html>
|
||||||
|
<html lang=\"fr\">
|
||||||
|
<head>
|
||||||
|
<meta charset=\"UTF-8\">
|
||||||
|
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
||||||
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"../public/styles/styleSignin.css\" media=\"screen\">
|
||||||
|
<title>Wiki Fantasy : Inscription</title>
|
||||||
|
<link id=\"favicon\" rel=\"icon\" href=\"../images/iconeSombre.ico\"> <!-- Par défaut sombre -->
|
||||||
|
<link href=\"https://fonts.googleapis.com/css2?family=Lemon&display=swap\" rel=\"stylesheet\">
|
||||||
|
<script defer src=\"../public/script/theme-toggle.js\"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class=\"container\">
|
||||||
|
<div class=\"header\">
|
||||||
|
<div class=\"nav\">
|
||||||
|
<a href=\"favorite.html\"><img src=\"../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\"></a>
|
||||||
|
<img id=\"theme-icon\" src=\"../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
||||||
|
<a href=\"quiz.html\"><img src=\"../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\"></a>
|
||||||
|
</div>
|
||||||
|
<div class=\"logo\">
|
||||||
|
<a href=\"accueil.html\"><img src=\"../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\"></a>
|
||||||
|
</div>
|
||||||
|
<div class=\"user\">
|
||||||
|
<img src=\"../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h1>▶ ";
|
||||||
|
// line 28
|
||||||
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["test"] ?? null), "html", null, true);
|
||||||
|
yield " ◀</h1>
|
||||||
|
<form method=\"post\">
|
||||||
|
<div class=\"signin\">
|
||||||
|
<div class=\"DivId\">
|
||||||
|
<p>Identifiant *</p>
|
||||||
|
<input type=\"text\" class=\"champ\" id=\"pseudo\" name=\"pseudo\" placeholder=\"Id\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"DivEmail\">
|
||||||
|
<p>Email *</p>
|
||||||
|
<input type=\"email\" class=\"champ\" id=\"email\" name=\"email\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"mdp\">
|
||||||
|
<p>Mot de passe *</p>
|
||||||
|
<input type=\"password\" class=\"champ\" id=\"mdp\" name=\"mdp\" required placeholder=\"";
|
||||||
|
// line 43
|
||||||
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["errors"] ?? null), "html", null, true);
|
||||||
|
yield "\"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"confmdp\">
|
||||||
|
<p>Confirmer mot de passe *</p>
|
||||||
|
<input type=\"password\" class=\"champ\" id=\"cmdp\" name=\"cmdp\" placeholder=\"";
|
||||||
|
// line 48
|
||||||
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["errors"] ?? null), "html", null, true);
|
||||||
|
yield "\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"imgprof\">
|
||||||
|
<p>Image *</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"confirmer\">
|
||||||
|
<input type=\"hidden\" class=\"btn\" name=\"action\" value=\"validsignin\" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>";
|
||||||
|
yield from [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getTemplateName(): string
|
||||||
|
{
|
||||||
|
return "signin6.html.twig";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function isTraitable(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getDebugInfo(): array
|
||||||
|
{
|
||||||
|
return array ( 97 => 48, 89 => 43, 71 => 28, 42 => 1,);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSourceContext(): Source
|
||||||
|
{
|
||||||
|
return new Source("", "signin6.html.twig", "/Users/kiem/Documents/WikiFantasy/WF-Website/vue/templates/signin6.html.twig");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,144 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Twig\Environment;
|
||||||
|
use Twig\Error\LoaderError;
|
||||||
|
use Twig\Error\RuntimeError;
|
||||||
|
use Twig\Extension\CoreExtension;
|
||||||
|
use Twig\Extension\SandboxExtension;
|
||||||
|
use Twig\Markup;
|
||||||
|
use Twig\Sandbox\SecurityError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
||||||
|
use Twig\Source;
|
||||||
|
use Twig\Template;
|
||||||
|
use Twig\TemplateWrapper;
|
||||||
|
|
||||||
|
/* signin7.html.twig */
|
||||||
|
class __TwigTemplate_179113c369ca1501764a939233b8ee58 extends Template
|
||||||
|
{
|
||||||
|
private Source $source;
|
||||||
|
/**
|
||||||
|
* @var array<string, Template>
|
||||||
|
*/
|
||||||
|
private array $macros = [];
|
||||||
|
|
||||||
|
public function __construct(Environment $env)
|
||||||
|
{
|
||||||
|
parent::__construct($env);
|
||||||
|
|
||||||
|
$this->source = $this->getSourceContext();
|
||||||
|
|
||||||
|
$this->parent = false;
|
||||||
|
|
||||||
|
$this->blocks = [
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
||||||
|
{
|
||||||
|
$macros = $this->macros;
|
||||||
|
// line 1
|
||||||
|
yield "<!DOCTYPE html>
|
||||||
|
<html lang=\"fr\">
|
||||||
|
<head>
|
||||||
|
<meta charset=\"UTF-8\">
|
||||||
|
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
||||||
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"../public/styles/styleSignin.css\" media=\"screen\">
|
||||||
|
<title>Wiki Fantasy : Inscription</title>
|
||||||
|
<link id=\"favicon\" rel=\"icon\" href=\"../images/iconeSombre.ico\"> <!-- Par défaut sombre -->
|
||||||
|
<link href=\"https://fonts.googleapis.com/css2?family=Lemon&display=swap\" rel=\"stylesheet\">
|
||||||
|
<script defer src=\"../public/script/theme-toggle.js\"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class=\"container\">
|
||||||
|
<div class=\"header\">
|
||||||
|
<div class=\"nav\">
|
||||||
|
<a href=\"favorite.html\"><img src=\"../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\"></a>
|
||||||
|
<img id=\"theme-icon\" src=\"../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
||||||
|
<a href=\"quiz.html\"><img src=\"../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\"></a>
|
||||||
|
</div>
|
||||||
|
<div class=\"logo\">
|
||||||
|
<a href=\"accueil.html\"><img src=\"../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\"></a>
|
||||||
|
</div>
|
||||||
|
<div class=\"user\">
|
||||||
|
<img src=\"../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h1>▶ ";
|
||||||
|
// line 28
|
||||||
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["test"] ?? null), "html", null, true);
|
||||||
|
yield " ◀</h1>
|
||||||
|
<form method=\"post\">
|
||||||
|
<div class=\"signin\">
|
||||||
|
<div class=\"DivId\">
|
||||||
|
<p>Identifiant *</p>
|
||||||
|
<input type=\"text\" class=\"champ\" id=\"pseudo\" name=\"pseudo\" placeholder=\"Id\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"DivEmail\">
|
||||||
|
<p>Email *</p>
|
||||||
|
<input type=\"email\" class=\"champ\" id=\"email\" name=\"email\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"mdp\">
|
||||||
|
<p>Mot de passe *</p>
|
||||||
|
<input type=\"password\" class=\"champ\" id=\"mdp\" name=\"mdp\" required placeholder=\"";
|
||||||
|
// line 43
|
||||||
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["errors"] ?? null), "html", null, true);
|
||||||
|
yield "\"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"confmdp\">
|
||||||
|
<p>Confirmer mot de passe *</p>
|
||||||
|
<input type=\"password\" class=\"champ\" id=\"cmdp\" name=\"cmdp\" placeholder=\"";
|
||||||
|
// line 48
|
||||||
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["errors"] ?? null), "html", null, true);
|
||||||
|
yield "\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"imgprof\">
|
||||||
|
<p>Image *</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"confirmer\">
|
||||||
|
<input type=\"submit\" class=\"btn\" name=\"action\" value=\"validsignin\" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>";
|
||||||
|
yield from [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getTemplateName(): string
|
||||||
|
{
|
||||||
|
return "signin7.html.twig";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function isTraitable(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getDebugInfo(): array
|
||||||
|
{
|
||||||
|
return array ( 97 => 48, 89 => 43, 71 => 28, 42 => 1,);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSourceContext(): Source
|
||||||
|
{
|
||||||
|
return new Source("", "signin7.html.twig", "/Users/kiem/Documents/WikiFantasy/WF-Website/vue/templates/signin7.html.twig");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,144 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Twig\Environment;
|
||||||
|
use Twig\Error\LoaderError;
|
||||||
|
use Twig\Error\RuntimeError;
|
||||||
|
use Twig\Extension\CoreExtension;
|
||||||
|
use Twig\Extension\SandboxExtension;
|
||||||
|
use Twig\Markup;
|
||||||
|
use Twig\Sandbox\SecurityError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
||||||
|
use Twig\Source;
|
||||||
|
use Twig\Template;
|
||||||
|
use Twig\TemplateWrapper;
|
||||||
|
|
||||||
|
/* signin1.html.twig */
|
||||||
|
class __TwigTemplate_c5ff4ebd3f89e0ca0a1643dfb2cba640 extends Template
|
||||||
|
{
|
||||||
|
private Source $source;
|
||||||
|
/**
|
||||||
|
* @var array<string, Template>
|
||||||
|
*/
|
||||||
|
private array $macros = [];
|
||||||
|
|
||||||
|
public function __construct(Environment $env)
|
||||||
|
{
|
||||||
|
parent::__construct($env);
|
||||||
|
|
||||||
|
$this->source = $this->getSourceContext();
|
||||||
|
|
||||||
|
$this->parent = false;
|
||||||
|
|
||||||
|
$this->blocks = [
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
||||||
|
{
|
||||||
|
$macros = $this->macros;
|
||||||
|
// line 1
|
||||||
|
yield "<!DOCTYPE html>
|
||||||
|
<html lang=\"fr\">
|
||||||
|
<head>
|
||||||
|
<meta charset=\"UTF-8\">
|
||||||
|
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
||||||
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"../public/styles/styleSignin.css\" media=\"screen\">
|
||||||
|
<title>Wiki Fantasy : Inscription</title>
|
||||||
|
<link id=\"favicon\" rel=\"icon\" href=\"../images/iconeSombre.ico\"> <!-- Par défaut sombre -->
|
||||||
|
<link href=\"https://fonts.googleapis.com/css2?family=Lemon&display=swap\" rel=\"stylesheet\">
|
||||||
|
<script defer src=\"../public/script/theme-toggle.js\"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class=\"container\">
|
||||||
|
<div class=\"header\">
|
||||||
|
<div class=\"nav\">
|
||||||
|
<a href=\"favorite.html\"><img src=\"../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\"></a>
|
||||||
|
<img id=\"theme-icon\" src=\"../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
||||||
|
<a href=\"quiz.html\"><img src=\"../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\"></a>
|
||||||
|
</div>
|
||||||
|
<div class=\"logo\">
|
||||||
|
<a href=\"accueil.html\"><img src=\"../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\"></a>
|
||||||
|
</div>
|
||||||
|
<div class=\"user\">
|
||||||
|
<img src=\"../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h1>▶ ";
|
||||||
|
// line 28
|
||||||
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["test"] ?? null), "html", null, true);
|
||||||
|
yield " ◀</h1>
|
||||||
|
<form method=\"post\">
|
||||||
|
<div class=\"signin\">
|
||||||
|
<div class=\"DivId\">
|
||||||
|
<p>Identifiant *</p>
|
||||||
|
<input type=\"text\" class=\"champ\" id=\"pseudo\" name=\"pseudo\" placeholder=\"Id\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"DivEmail\">
|
||||||
|
<p>Email *</p>
|
||||||
|
<input type=\"email\" class=\"champ\" id=\"email\" name=\"email\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"mdp\">
|
||||||
|
<p>Mot de passe *</p>
|
||||||
|
<input type=\"password\" class=\"champ\" id=\"mdp\" name=\"mdp\" required placeholder=\"";
|
||||||
|
// line 43
|
||||||
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["errors"] ?? null), "html", null, true);
|
||||||
|
yield "\"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"confmdp\">
|
||||||
|
<p>Confirmer mot de passe *</p>
|
||||||
|
<input type=\"password\" class=\"champ\" id=\"cmdp\" name=\"cmdp\" placeholder=\"";
|
||||||
|
// line 48
|
||||||
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["errors"] ?? null), "html", null, true);
|
||||||
|
yield "\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"imgprof\">
|
||||||
|
<p>Image *</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"confirmer\">
|
||||||
|
<input type=\"submit\" class=\"btn\" name=\"action\" value=\"validsignin\" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>";
|
||||||
|
yield from [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getTemplateName(): string
|
||||||
|
{
|
||||||
|
return "signin1.html.twig";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function isTraitable(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getDebugInfo(): array
|
||||||
|
{
|
||||||
|
return array ( 97 => 48, 89 => 43, 71 => 28, 42 => 1,);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSourceContext(): Source
|
||||||
|
{
|
||||||
|
return new Source("", "signin1.html.twig", "/Users/kiem/Documents/WikiFantasy/WF-Website/vue/templates/signin1.html.twig");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,127 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Twig\Environment;
|
||||||
|
use Twig\Error\LoaderError;
|
||||||
|
use Twig\Error\RuntimeError;
|
||||||
|
use Twig\Extension\CoreExtension;
|
||||||
|
use Twig\Extension\SandboxExtension;
|
||||||
|
use Twig\Markup;
|
||||||
|
use Twig\Sandbox\SecurityError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
||||||
|
use Twig\Source;
|
||||||
|
use Twig\Template;
|
||||||
|
use Twig\TemplateWrapper;
|
||||||
|
|
||||||
|
/* signin.html.twig */
|
||||||
|
class __TwigTemplate_f3fb3bd89b84ec5439a034a1b7acb44e extends Template
|
||||||
|
{
|
||||||
|
private Source $source;
|
||||||
|
/**
|
||||||
|
* @var array<string, Template>
|
||||||
|
*/
|
||||||
|
private array $macros = [];
|
||||||
|
|
||||||
|
public function __construct(Environment $env)
|
||||||
|
{
|
||||||
|
parent::__construct($env);
|
||||||
|
|
||||||
|
$this->source = $this->getSourceContext();
|
||||||
|
|
||||||
|
$this->parent = false;
|
||||||
|
|
||||||
|
$this->blocks = [
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
||||||
|
{
|
||||||
|
$macros = $this->macros;
|
||||||
|
// line 1
|
||||||
|
yield "<!DOCTYPE html>
|
||||||
|
<html lang=\"fr\">
|
||||||
|
<head>
|
||||||
|
<meta charset=\"UTF-8\">
|
||||||
|
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
||||||
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"../public/styles/styleSignin.css\" media=\"screen\">
|
||||||
|
<title>Wiki Fantasy : Inscription</title>
|
||||||
|
<link id=\"favicon\" rel=\"icon\" href=\"../images/iconeSombre.ico\"> <!-- Par défaut sombre -->
|
||||||
|
<link href=\"https://fonts.googleapis.com/css2?family=Lemon&display=swap\" rel=\"stylesheet\">
|
||||||
|
<script defer src=\"../public/script/theme-toggle.js\"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class=\"container\">
|
||||||
|
<div class=\"header\">
|
||||||
|
<div class=\"nav\">
|
||||||
|
<a href=\"favorite.html\"><img src=\"../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\"></a>
|
||||||
|
<img id=\"theme-icon\" src=\"../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
||||||
|
<a href=\"quiz.html\"><img src=\"../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\"></a>
|
||||||
|
</div>
|
||||||
|
<div class=\"logo\">
|
||||||
|
<a href=\"accueil.html\"><img src=\"../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\"></a>
|
||||||
|
</div>
|
||||||
|
<div class=\"user\">
|
||||||
|
<img src=\"../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h1>▶ S'inscrire ◀</h1>
|
||||||
|
<form method=\"post\">
|
||||||
|
<div class=\"signin\">
|
||||||
|
<div class=\"DivId\">
|
||||||
|
<p>Identifiant *</p>
|
||||||
|
<input type=\"text\" class=\"champ\" id=\"pseudo\" name=\"pseudo\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"DivEmail\">
|
||||||
|
<p>Email *</p>
|
||||||
|
<input type=\"email\" class=\"champ\" id=\"email\" name=\"email\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"mdp\">
|
||||||
|
<p>Mot de passe *</p>
|
||||||
|
<input type=\"password\" class=\"champ\" id=\"mdp\" name=\"mdp\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"confmdp\">
|
||||||
|
<p>Confirmer mot de passe *</p>
|
||||||
|
<input type=\"password\" class=\"champ\" id=\"cmdp\" name=\"cmdp\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"imgprof\">
|
||||||
|
<p>Image *</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"confirmer\">
|
||||||
|
<input type=\"submit\" class=\"btn\" value=\"Inscription\" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>";
|
||||||
|
yield from [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getTemplateName(): string
|
||||||
|
{
|
||||||
|
return "signin.html.twig";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getDebugInfo(): array
|
||||||
|
{
|
||||||
|
return array ( 42 => 1,);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSourceContext(): Source
|
||||||
|
{
|
||||||
|
return new Source("", "signin.html.twig", "/Users/kiem/Documents/WikiFantasy/WF-Website/vue/templates/signin.html.twig");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,141 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Twig\Environment;
|
||||||
|
use Twig\Error\LoaderError;
|
||||||
|
use Twig\Error\RuntimeError;
|
||||||
|
use Twig\Extension\CoreExtension;
|
||||||
|
use Twig\Extension\SandboxExtension;
|
||||||
|
use Twig\Markup;
|
||||||
|
use Twig\Sandbox\SecurityError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
||||||
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
||||||
|
use Twig\Source;
|
||||||
|
use Twig\Template;
|
||||||
|
use Twig\TemplateWrapper;
|
||||||
|
|
||||||
|
/* signin3.html.twig */
|
||||||
|
class __TwigTemplate_13f68f972002b997fce4f87301b50b63 extends Template
|
||||||
|
{
|
||||||
|
private Source $source;
|
||||||
|
/**
|
||||||
|
* @var array<string, Template>
|
||||||
|
*/
|
||||||
|
private array $macros = [];
|
||||||
|
|
||||||
|
public function __construct(Environment $env)
|
||||||
|
{
|
||||||
|
parent::__construct($env);
|
||||||
|
|
||||||
|
$this->source = $this->getSourceContext();
|
||||||
|
|
||||||
|
$this->parent = false;
|
||||||
|
|
||||||
|
$this->blocks = [
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
||||||
|
{
|
||||||
|
$macros = $this->macros;
|
||||||
|
// line 1
|
||||||
|
yield "<!DOCTYPE html>
|
||||||
|
<html lang=\"fr\">
|
||||||
|
<head>
|
||||||
|
<meta charset=\"UTF-8\">
|
||||||
|
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
||||||
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"../public/styles/styleSignin.css\" media=\"screen\">
|
||||||
|
<title>Wiki Fantasy : Inscription</title>
|
||||||
|
<link id=\"favicon\" rel=\"icon\" href=\"../images/iconeSombre.ico\"> <!-- Par défaut sombre -->
|
||||||
|
<link href=\"https://fonts.googleapis.com/css2?family=Lemon&display=swap\" rel=\"stylesheet\">
|
||||||
|
<script defer src=\"../public/script/theme-toggle.js\"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class=\"container\">
|
||||||
|
<div class=\"header\">
|
||||||
|
<div class=\"nav\">
|
||||||
|
<a href=\"favorite.html\"><img src=\"../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\"></a>
|
||||||
|
<img id=\"theme-icon\" src=\"../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
||||||
|
<a href=\"quiz.html\"><img src=\"../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\"></a>
|
||||||
|
</div>
|
||||||
|
<div class=\"logo\">
|
||||||
|
<a href=\"accueil.html\"><img src=\"../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\"></a>
|
||||||
|
</div>
|
||||||
|
<div class=\"user\">
|
||||||
|
<img src=\"../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h1>▶ lo ◀</h1>
|
||||||
|
<form method=\"post\">
|
||||||
|
<div class=\"signin\">
|
||||||
|
<div class=\"DivId\">
|
||||||
|
<p>Identifiant *</p>
|
||||||
|
<input type=\"text\" class=\"champ\" id=\"pseudo\" name=\"pseudo\" placeholder=\"Id\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"DivEmail\">
|
||||||
|
<p>Email *</p>
|
||||||
|
<input type=\"email\" class=\"champ\" id=\"email\" name=\"email\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"mdp\">
|
||||||
|
<p>Mot de passe *</p>
|
||||||
|
<input type=\"password\" class=\"champ\" id=\"mdp\" name=\"mdp\" required placeholder=\"";
|
||||||
|
// line 43
|
||||||
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["errors"] ?? null), "html", null, true);
|
||||||
|
yield "\"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"confmdp\">
|
||||||
|
<p>Confirmer mot de passe *</p>
|
||||||
|
<input type=\"password\" class=\"champ\" id=\"cmdp\" name=\"cmdp\" placeholder=\"";
|
||||||
|
// line 48
|
||||||
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["errors"] ?? null), "html", null, true);
|
||||||
|
yield "\" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"imgprof\">
|
||||||
|
<p>Image *</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=\"confirmer\">
|
||||||
|
<input type=\"submit\" class=\"btn\" value=\"Inscription\" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>";
|
||||||
|
yield from [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getTemplateName(): string
|
||||||
|
{
|
||||||
|
return "signin3.html.twig";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function isTraitable(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*/
|
||||||
|
public function getDebugInfo(): array
|
||||||
|
{
|
||||||
|
return array ( 94 => 48, 86 => 43, 42 => 1,);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSourceContext(): Source
|
||||||
|
{
|
||||||
|
return new Source("", "signin3.html.twig", "/Users/kiem/Documents/WikiFantasy/WF-Website/vue/templates/signin3.html.twig");
|
||||||
|
}
|
||||||
|
}
|
@ -1,102 +1,102 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Twig\Environment;
|
use Twig\Environment;
|
||||||
use Twig\Error\LoaderError;
|
use Twig\Error\LoaderError;
|
||||||
use Twig\Error\RuntimeError;
|
use Twig\Error\RuntimeError;
|
||||||
use Twig\Extension\CoreExtension;
|
use Twig\Extension\CoreExtension;
|
||||||
use Twig\Extension\SandboxExtension;
|
use Twig\Extension\SandboxExtension;
|
||||||
use Twig\Markup;
|
use Twig\Markup;
|
||||||
use Twig\Sandbox\SecurityError;
|
use Twig\Sandbox\SecurityError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedTagError;
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
||||||
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
||||||
use Twig\Source;
|
use Twig\Source;
|
||||||
use Twig\Template;
|
use Twig\Template;
|
||||||
use Twig\TemplateWrapper;
|
use Twig\TemplateWrapper;
|
||||||
|
|
||||||
/* login.html */
|
/* login.html */
|
||||||
class __TwigTemplate_2cd0c955593f8f6da78deaca6452905d extends Template
|
class __TwigTemplate_2cd0c955593f8f6da78deaca6452905d extends Template
|
||||||
{
|
{
|
||||||
private Source $source;
|
private Source $source;
|
||||||
/**
|
/**
|
||||||
* @var array<string, Template>
|
* @var array<string, Template>
|
||||||
*/
|
*/
|
||||||
private array $macros = [];
|
private array $macros = [];
|
||||||
|
|
||||||
public function __construct(Environment $env)
|
public function __construct(Environment $env)
|
||||||
{
|
{
|
||||||
parent::__construct($env);
|
parent::__construct($env);
|
||||||
|
|
||||||
$this->source = $this->getSourceContext();
|
$this->source = $this->getSourceContext();
|
||||||
|
|
||||||
$this->parent = false;
|
$this->parent = false;
|
||||||
|
|
||||||
$this->blocks = [
|
$this->blocks = [
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function doDisplay(array $context, array $blocks = []): iterable
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
||||||
{
|
{
|
||||||
$macros = $this->macros;
|
$macros = $this->macros;
|
||||||
// line 1
|
// line 1
|
||||||
yield " <div class=\"container\">
|
yield " <div class=\"container\">
|
||||||
<div class=\"header\">
|
<div class=\"header\">
|
||||||
<div class=\"nav\">
|
<div class=\"nav\">
|
||||||
<img src=\"../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\">
|
<img src=\"../images/coeur.svg\" alt=\"coeur\" width=\"67px\" height=\"67px\" onmousedown=\"return false\">
|
||||||
<img id=\"theme-icon\" src=\"../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
<img id=\"theme-icon\" src=\"../images/light.svg\" alt=\"toggle theme\" width=\"72px\" height=\"37px\" onmousedown=\"return false\" onclick=\"toggleTheme()\">
|
||||||
<img src=\"../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\">
|
<img src=\"../images/quizz.svg\" alt=\"quizz\" width=\"51px\" height=\"82px\" onmousedown=\"return false\">
|
||||||
</div>
|
</div>
|
||||||
<div class=\"logo\">
|
<div class=\"logo\">
|
||||||
<a href=\"accueil.html\"><img src=\"../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\"></a>
|
<a href=\"accueil.html\"><img src=\"../images/WIKIFANTASY.png\" alt=\"Logo\" width=\"227px\" height=\"106px\" onmousedown=\"return false\"></a>
|
||||||
</div>
|
</div>
|
||||||
<div class=\"user\">
|
<div class=\"user\">
|
||||||
<img src=\"../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\">
|
<img src=\"../images/user_dark.png\" alt=\"user\" width=\"70px\" height=\"70px\" onmousedown=\"return false\">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h1>▶ Connexion ◀</h1>
|
<h1>▶ Connexion ◀</h1>
|
||||||
|
|
||||||
<div class=\"login\">
|
<div class=\"login\">
|
||||||
<p> <strong>Identifiant *</strong></p>
|
<p> <strong>Identifiant *</strong></p>
|
||||||
<input type=\"text\" class=\"connexion\" name=\"name\" required />
|
<input type=\"text\" class=\"connexion\" name=\"name\" required />
|
||||||
|
|
||||||
<p> <strong> Mot de passe *</strong></p>
|
<p> <strong> Mot de passe *</strong></p>
|
||||||
<input type=\"password\" class=\"connexion\" name=\"passwd\" required />
|
<input type=\"password\" class=\"connexion\" name=\"passwd\" required />
|
||||||
|
|
||||||
<div class=\"createAccount\">
|
<div class=\"createAccount\">
|
||||||
<p class=\"createAccount\">Vous n'avez pas de compte?</p>
|
<p class=\"createAccount\">Vous n'avez pas de compte?</p>
|
||||||
<a href=\"/signin\" class=\"createAccount\">S'incrire</a>
|
<a href=\"/signin\" class=\"createAccount\">S'incrire</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class=\"buttonSudmiteDiv\">
|
<div class=\"buttonSudmiteDiv\">
|
||||||
<button class=\"buttonSudmite\">Connexion</button>
|
<button class=\"buttonSudmite\">Connexion</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>";
|
</html>";
|
||||||
yield from [];
|
yield from [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function getTemplateName(): string
|
public function getTemplateName(): string
|
||||||
{
|
{
|
||||||
return "login.html";
|
return "login.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function getDebugInfo(): array
|
public function getDebugInfo(): array
|
||||||
{
|
{
|
||||||
return array ( 42 => 1,);
|
return array ( 42 => 1,);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSourceContext(): Source
|
public function getSourceContext(): Source
|
||||||
{
|
{
|
||||||
return new Source("", "login.html", "/home/www/lebeaulato/public_html/WF-Website/vue/templates/login.html");
|
return new Source("", "login.html", "/home/www/lebeaulato/public_html/WF-Website/vue/templates/login.html");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"require": {
|
"require": {
|
||||||
"twig/twig": "^3.0",
|
"twig/twig": "^3.0",
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
"altorouter/altorouter": "^2.0"
|
"altorouter/altorouter": "^2.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Controleur\\": "src/Controleur/",
|
"Controleur\\": "src/Controleur/",
|
||||||
"Model\\": "src/Model/",
|
"Model\\": "src/Model/",
|
||||||
"Gateway\\": "src/Gateway/",
|
"Gateway\\": "src/Gateway/",
|
||||||
"Entity\\": "src/Entity/"
|
"Entity\\": "src/Entity/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,462 +1,462 @@
|
|||||||
{
|
{
|
||||||
"_readme": [
|
"_readme": [
|
||||||
"This file locks the dependencies of your project to a known state",
|
"This file locks the dependencies of your project to a known state",
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "68804b2111cb6b8bf6edf66cb2b4669c",
|
"content-hash": "68804b2111cb6b8bf6edf66cb2b4669c",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "altorouter/altorouter",
|
"name": "altorouter/altorouter",
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/dannyvankooten/AltoRouter.git",
|
"url": "https://github.com/dannyvankooten/AltoRouter.git",
|
||||||
"reference": "f6fede4f94ced7c22ba63a9b8af0bf2dc38e3cb2"
|
"reference": "f6fede4f94ced7c22ba63a9b8af0bf2dc38e3cb2"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/dannyvankooten/AltoRouter/zipball/f6fede4f94ced7c22ba63a9b8af0bf2dc38e3cb2",
|
"url": "https://api.github.com/repos/dannyvankooten/AltoRouter/zipball/f6fede4f94ced7c22ba63a9b8af0bf2dc38e3cb2",
|
||||||
"reference": "f6fede4f94ced7c22ba63a9b8af0bf2dc38e3cb2",
|
"reference": "f6fede4f94ced7c22ba63a9b8af0bf2dc38e3cb2",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.6.0"
|
"php": ">=5.6.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"codeclimate/php-test-reporter": "dev-master",
|
"codeclimate/php-test-reporter": "dev-master",
|
||||||
"phpunit/phpunit": "5.7.*",
|
"phpunit/phpunit": "5.7.*",
|
||||||
"squizlabs/php_codesniffer": "3.4.2"
|
"squizlabs/php_codesniffer": "3.4.2"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
"AltoRouter.php"
|
"AltoRouter.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Danny van Kooten",
|
"name": "Danny van Kooten",
|
||||||
"email": "dannyvankooten@gmail.com",
|
"email": "dannyvankooten@gmail.com",
|
||||||
"homepage": "http://dannyvankooten.com/"
|
"homepage": "http://dannyvankooten.com/"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Koen Punt",
|
"name": "Koen Punt",
|
||||||
"homepage": "https://github.com/koenpunt"
|
"homepage": "https://github.com/koenpunt"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "niahoo",
|
"name": "niahoo",
|
||||||
"homepage": "https://github.com/niahoo"
|
"homepage": "https://github.com/niahoo"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "A lightning fast router for PHP",
|
"description": "A lightning fast router for PHP",
|
||||||
"homepage": "https://github.com/dannyvankooten/AltoRouter",
|
"homepage": "https://github.com/dannyvankooten/AltoRouter",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"lightweight",
|
"lightweight",
|
||||||
"router",
|
"router",
|
||||||
"routing"
|
"routing"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/dannyvankooten/AltoRouter/issues",
|
"issues": "https://github.com/dannyvankooten/AltoRouter/issues",
|
||||||
"source": "https://github.com/dannyvankooten/AltoRouter/tree/2.0.2"
|
"source": "https://github.com/dannyvankooten/AltoRouter/tree/2.0.2"
|
||||||
},
|
},
|
||||||
"time": "2020-03-09T08:34:59+00:00"
|
"time": "2020-03-09T08:34:59+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/deprecation-contracts",
|
"name": "symfony/deprecation-contracts",
|
||||||
"version": "v3.5.0",
|
"version": "v3.5.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/deprecation-contracts.git",
|
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||||
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1"
|
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
|
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
|
||||||
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
|
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.1"
|
"php": ">=8.1"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "3.5-dev"
|
"dev-main": "3.5-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/contracts",
|
"name": "symfony/contracts",
|
||||||
"url": "https://github.com/symfony/contracts"
|
"url": "https://github.com/symfony/contracts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [
|
"files": [
|
||||||
"function.php"
|
"function.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Nicolas Grekas",
|
"name": "Nicolas Grekas",
|
||||||
"email": "p@tchwork.com"
|
"email": "p@tchwork.com"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Symfony Community",
|
"name": "Symfony Community",
|
||||||
"homepage": "https://symfony.com/contributors"
|
"homepage": "https://symfony.com/contributors"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "A generic function and convention to trigger deprecation notices",
|
"description": "A generic function and convention to trigger deprecation notices",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0"
|
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"url": "https://symfony.com/sponsor",
|
"url": "https://symfony.com/sponsor",
|
||||||
"type": "custom"
|
"type": "custom"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://github.com/fabpot",
|
"url": "https://github.com/fabpot",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-04-18T09:32:20+00:00"
|
"time": "2024-04-18T09:32:20+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "symfony/polyfill-ctype",
|
||||||
"version": "v1.31.0",
|
"version": "v1.31.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||||
"reference": "a3cc8b044a6ea513310cbd48ef7333b384945638"
|
"reference": "a3cc8b044a6ea513310cbd48ef7333b384945638"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638",
|
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638",
|
||||||
"reference": "a3cc8b044a6ea513310cbd48ef7333b384945638",
|
"reference": "a3cc8b044a6ea513310cbd48ef7333b384945638",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.2"
|
"php": ">=7.2"
|
||||||
},
|
},
|
||||||
"provide": {
|
"provide": {
|
||||||
"ext-ctype": "*"
|
"ext-ctype": "*"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-ctype": "For best performance"
|
"ext-ctype": "For best performance"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"name": "symfony/polyfill",
|
||||||
"url": "https://github.com/symfony/polyfill"
|
"url": "https://github.com/symfony/polyfill"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [
|
"files": [
|
||||||
"bootstrap.php"
|
"bootstrap.php"
|
||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Polyfill\\Ctype\\": ""
|
"Symfony\\Polyfill\\Ctype\\": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Gert de Pagter",
|
"name": "Gert de Pagter",
|
||||||
"email": "BackEndTea@gmail.com"
|
"email": "BackEndTea@gmail.com"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Symfony Community",
|
"name": "Symfony Community",
|
||||||
"homepage": "https://symfony.com/contributors"
|
"homepage": "https://symfony.com/contributors"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Symfony polyfill for ctype functions",
|
"description": "Symfony polyfill for ctype functions",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"compatibility",
|
"compatibility",
|
||||||
"ctype",
|
"ctype",
|
||||||
"polyfill",
|
"polyfill",
|
||||||
"portable"
|
"portable"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0"
|
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"url": "https://symfony.com/sponsor",
|
"url": "https://symfony.com/sponsor",
|
||||||
"type": "custom"
|
"type": "custom"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://github.com/fabpot",
|
"url": "https://github.com/fabpot",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-09-09T11:45:10+00:00"
|
"time": "2024-09-09T11:45:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-mbstring",
|
"name": "symfony/polyfill-mbstring",
|
||||||
"version": "v1.31.0",
|
"version": "v1.31.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||||
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341"
|
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341",
|
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341",
|
||||||
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341",
|
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.2"
|
"php": ">=7.2"
|
||||||
},
|
},
|
||||||
"provide": {
|
"provide": {
|
||||||
"ext-mbstring": "*"
|
"ext-mbstring": "*"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-mbstring": "For best performance"
|
"ext-mbstring": "For best performance"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"name": "symfony/polyfill",
|
||||||
"url": "https://github.com/symfony/polyfill"
|
"url": "https://github.com/symfony/polyfill"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [
|
"files": [
|
||||||
"bootstrap.php"
|
"bootstrap.php"
|
||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Polyfill\\Mbstring\\": ""
|
"Symfony\\Polyfill\\Mbstring\\": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Nicolas Grekas",
|
"name": "Nicolas Grekas",
|
||||||
"email": "p@tchwork.com"
|
"email": "p@tchwork.com"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Symfony Community",
|
"name": "Symfony Community",
|
||||||
"homepage": "https://symfony.com/contributors"
|
"homepage": "https://symfony.com/contributors"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Symfony polyfill for the Mbstring extension",
|
"description": "Symfony polyfill for the Mbstring extension",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"compatibility",
|
"compatibility",
|
||||||
"mbstring",
|
"mbstring",
|
||||||
"polyfill",
|
"polyfill",
|
||||||
"portable",
|
"portable",
|
||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0"
|
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"url": "https://symfony.com/sponsor",
|
"url": "https://symfony.com/sponsor",
|
||||||
"type": "custom"
|
"type": "custom"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://github.com/fabpot",
|
"url": "https://github.com/fabpot",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-09-09T11:45:10+00:00"
|
"time": "2024-09-09T11:45:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-php81",
|
"name": "symfony/polyfill-php81",
|
||||||
"version": "v1.31.0",
|
"version": "v1.31.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-php81.git",
|
"url": "https://github.com/symfony/polyfill-php81.git",
|
||||||
"reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c"
|
"reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
|
"url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
|
||||||
"reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
|
"reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.2"
|
"php": ">=7.2"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"name": "symfony/polyfill",
|
||||||
"url": "https://github.com/symfony/polyfill"
|
"url": "https://github.com/symfony/polyfill"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [
|
"files": [
|
||||||
"bootstrap.php"
|
"bootstrap.php"
|
||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Polyfill\\Php81\\": ""
|
"Symfony\\Polyfill\\Php81\\": ""
|
||||||
},
|
},
|
||||||
"classmap": [
|
"classmap": [
|
||||||
"Resources/stubs"
|
"Resources/stubs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Nicolas Grekas",
|
"name": "Nicolas Grekas",
|
||||||
"email": "p@tchwork.com"
|
"email": "p@tchwork.com"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Symfony Community",
|
"name": "Symfony Community",
|
||||||
"homepage": "https://symfony.com/contributors"
|
"homepage": "https://symfony.com/contributors"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
|
"description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"compatibility",
|
"compatibility",
|
||||||
"polyfill",
|
"polyfill",
|
||||||
"portable",
|
"portable",
|
||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0"
|
"source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"url": "https://symfony.com/sponsor",
|
"url": "https://symfony.com/sponsor",
|
||||||
"type": "custom"
|
"type": "custom"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://github.com/fabpot",
|
"url": "https://github.com/fabpot",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-09-09T11:45:10+00:00"
|
"time": "2024-09-09T11:45:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "twig/twig",
|
"name": "twig/twig",
|
||||||
"version": "v3.14.0",
|
"version": "v3.14.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/twigphp/Twig.git",
|
"url": "https://github.com/twigphp/Twig.git",
|
||||||
"reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72"
|
"reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/126b2c97818dbff0cdf3fbfc881aedb3d40aae72",
|
"url": "https://api.github.com/repos/twigphp/Twig/zipball/126b2c97818dbff0cdf3fbfc881aedb3d40aae72",
|
||||||
"reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72",
|
"reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.0.2",
|
"php": ">=8.0.2",
|
||||||
"symfony/deprecation-contracts": "^2.5|^3",
|
"symfony/deprecation-contracts": "^2.5|^3",
|
||||||
"symfony/polyfill-ctype": "^1.8",
|
"symfony/polyfill-ctype": "^1.8",
|
||||||
"symfony/polyfill-mbstring": "^1.3",
|
"symfony/polyfill-mbstring": "^1.3",
|
||||||
"symfony/polyfill-php81": "^1.29"
|
"symfony/polyfill-php81": "^1.29"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"psr/container": "^1.0|^2.0",
|
"psr/container": "^1.0|^2.0",
|
||||||
"symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0"
|
"symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [
|
"files": [
|
||||||
"src/Resources/core.php",
|
"src/Resources/core.php",
|
||||||
"src/Resources/debug.php",
|
"src/Resources/debug.php",
|
||||||
"src/Resources/escaper.php",
|
"src/Resources/escaper.php",
|
||||||
"src/Resources/string_loader.php"
|
"src/Resources/string_loader.php"
|
||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Twig\\": "src/"
|
"Twig\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"BSD-3-Clause"
|
"BSD-3-Clause"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Fabien Potencier",
|
"name": "Fabien Potencier",
|
||||||
"email": "fabien@symfony.com",
|
"email": "fabien@symfony.com",
|
||||||
"homepage": "http://fabien.potencier.org",
|
"homepage": "http://fabien.potencier.org",
|
||||||
"role": "Lead Developer"
|
"role": "Lead Developer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Twig Team",
|
"name": "Twig Team",
|
||||||
"role": "Contributors"
|
"role": "Contributors"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Armin Ronacher",
|
"name": "Armin Ronacher",
|
||||||
"email": "armin.ronacher@active-4.com",
|
"email": "armin.ronacher@active-4.com",
|
||||||
"role": "Project Founder"
|
"role": "Project Founder"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Twig, the flexible, fast, and secure template language for PHP",
|
"description": "Twig, the flexible, fast, and secure template language for PHP",
|
||||||
"homepage": "https://twig.symfony.com",
|
"homepage": "https://twig.symfony.com",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"templating"
|
"templating"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/twigphp/Twig/issues",
|
"issues": "https://github.com/twigphp/Twig/issues",
|
||||||
"source": "https://github.com/twigphp/Twig/tree/v3.14.0"
|
"source": "https://github.com/twigphp/Twig/tree/v3.14.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"url": "https://github.com/fabpot",
|
"url": "https://github.com/fabpot",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://tidelift.com/funding/github/packagist/twig/twig",
|
"url": "https://tidelift.com/funding/github/packagist/twig/twig",
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-09-09T17:55:12+00:00"
|
"time": "2024-09-09T17:55:12+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"stability-flags": {},
|
"stability-flags": {},
|
||||||
"prefer-stable": false,
|
"prefer-stable": false,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": {
|
"platform": {
|
||||||
"ext-pdo": "*"
|
"ext-pdo": "*"
|
||||||
},
|
},
|
||||||
"platform-dev": {},
|
"platform-dev": {},
|
||||||
"plugin-api-version": "2.6.0"
|
"plugin-api-version": "2.6.0"
|
||||||
}
|
}
|
||||||
|
@ -1,62 +1,62 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: CI-pipeline
|
name: CI-pipeline
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
|
||||||
- name: code-inspection
|
- name: code-inspection
|
||||||
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet8
|
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet8
|
||||||
secrets: [ SECRET_SONAR_LOGIN ]
|
secrets: [ SECRET_SONAR_LOGIN ]
|
||||||
settings:
|
settings:
|
||||||
sonar_host: https://codefirst.iut.uca.fr/sonar/
|
sonar_host: https://codefirst.iut.uca.fr/sonar/
|
||||||
sonar_token:
|
sonar_token:
|
||||||
from_secret: SECRET_SONAR_LOGIN
|
from_secret: SECRET_SONAR_LOGIN
|
||||||
commands:
|
commands:
|
||||||
- dotnet sonarscanner begin /k:WF-Website /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions="" /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
|
- dotnet sonarscanner begin /k:WF-Website /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions="" /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
|
||||||
|
|
||||||
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
|
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
|
||||||
- dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
|
- dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
|
||||||
|
|
||||||
# database container deployment
|
# database container deployment
|
||||||
- name: deploy-container-mysql-WIKI_FANTASY
|
- name: deploy-container-mysql-WIKI_FANTASY
|
||||||
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
|
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
|
||||||
environment:
|
environment:
|
||||||
IMAGENAME: mysql:latest
|
IMAGENAME: mysql:latest
|
||||||
CONTAINERNAME: mysql
|
CONTAINERNAME: mysql
|
||||||
COMMAND: create
|
COMMAND: create
|
||||||
OVERWRITE: false
|
OVERWRITE: false
|
||||||
PRIVATE: true
|
PRIVATE: true
|
||||||
|
|
||||||
CODEFIRST_CLIENTDRONE_ENV_MYSQL_ROOT_PASSWORD:
|
CODEFIRST_CLIENTDRONE_ENV_MYSQL_ROOT_PASSWORD:
|
||||||
from_secret: db_root_password
|
from_secret: db_root_password
|
||||||
CODEFIRST_CLIENTDRONE_ENV_MYSQL_DATABASE:
|
CODEFIRST_CLIENTDRONE_ENV_MYSQL_DATABASE:
|
||||||
from_secret: db_database
|
from_secret: db_database
|
||||||
CODEFIRST_CLIENTDRONE_ENV_MYSQL_USER:
|
CODEFIRST_CLIENTDRONE_ENV_MYSQL_USER:
|
||||||
from_secret: db_user
|
from_secret: db_user
|
||||||
CODEFIRST_CLIENTDRONE_ENV_MYSQL_PASSWORD:
|
CODEFIRST_CLIENTDRONE_ENV_MYSQL_PASSWORD:
|
||||||
from_secret: db_password
|
from_secret: db_password
|
||||||
ADMINS: kentinbrongniart , kevinmondejar , lenibeaulaton , louisguichard-montguers , maximerocher , tommynguyen , matthieurestituito
|
ADMINS: kentinbrongniart , kevinmondejar , lenibeaulaton , louisguichard-montguers , maximerocher , tommynguyen , matthieurestituito
|
||||||
|
|
||||||
|
|
||||||
- name: generate-and-deploy-docs
|
- name: generate-and-deploy-docs
|
||||||
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer
|
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer
|
||||||
failure: ignore
|
failure: ignore
|
||||||
volumes:
|
volumes:
|
||||||
- name:
|
- name:
|
||||||
path:
|
path:
|
||||||
commands:
|
commands:
|
||||||
- /entrypoint.sh
|
- /entrypoint.sh
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
- pull_request
|
- pull_request
|
||||||
depends_on: []
|
depends_on: []
|
||||||
|
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 272 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 272 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@ -1,39 +1,39 @@
|
|||||||
// auth-check.js
|
// auth-check.js
|
||||||
|
|
||||||
// Vérifier si l'utilisateur est connecté
|
// Vérifier si l'utilisateur est connecté
|
||||||
function isUserLoggedIn() {
|
function isUserLoggedIn() {
|
||||||
// Vérifiez si 'isLoggedIn' est défini dans le localStorage ou par un cookie
|
// Vérifiez si 'isLoggedIn' est défini dans le localStorage ou par un cookie
|
||||||
return localStorage.getItem('isLoggedIn') === 'true';
|
return localStorage.getItem('isLoggedIn') === 'true';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redirection des liens en fonction de l'état de connexion
|
// Redirection des liens en fonction de l'état de connexion
|
||||||
function setupLinks() {
|
function setupLinks() {
|
||||||
const favoriteLink = document.querySelector('a[href="favorite.html"]');
|
const favoriteLink = document.querySelector('a[href="favorite.html"]');
|
||||||
const quizLink = document.querySelector('a[href="quiz.html"]');
|
const quizLink = document.querySelector('a[href="quiz.html"]');
|
||||||
const userIcon = document.querySelector('.user img');
|
const userIcon = document.querySelector('.user img');
|
||||||
|
|
||||||
if (!isUserLoggedIn()) {
|
if (!isUserLoggedIn()) {
|
||||||
// Si l'utilisateur n'est pas connecté, rediriger vers la page de connexion
|
// Si l'utilisateur n'est pas connecté, rediriger vers la page de connexion
|
||||||
if (favoriteLink) favoriteLink.href = "login.html";
|
if (favoriteLink) favoriteLink.href = "login.html";
|
||||||
if (quizLink) quizLink.href = "login.html";
|
if (quizLink) quizLink.href = "login.html";
|
||||||
if (userIcon) {
|
if (userIcon) {
|
||||||
userIcon.style.cursor = "pointer"; // Changer le curseur pour indiquer la cliquabilité
|
userIcon.style.cursor = "pointer"; // Changer le curseur pour indiquer la cliquabilité
|
||||||
userIcon.addEventListener('click', () => {
|
userIcon.addEventListener('click', () => {
|
||||||
window.location.href = "login.html";
|
window.location.href = "login.html";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Si l'utilisateur est connecté, définir les liens vers les pages dédiées
|
// Si l'utilisateur est connecté, définir les liens vers les pages dédiées
|
||||||
if (favoriteLink) favoriteLink.href = "favorite.html";
|
if (favoriteLink) favoriteLink.href = "favorite.html";
|
||||||
if (quizLink) quizLink.href = "quiz.html";
|
if (quizLink) quizLink.href = "quiz.html";
|
||||||
if (userIcon) {
|
if (userIcon) {
|
||||||
userIcon.style.cursor = "pointer"; // Changer le curseur pour indiquer la cliquabilité
|
userIcon.style.cursor = "pointer"; // Changer le curseur pour indiquer la cliquabilité
|
||||||
userIcon.addEventListener('click', () => {
|
userIcon.addEventListener('click', () => {
|
||||||
window.location.href = "user-profile.html";
|
window.location.href = "user-profile.html";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialiser les liens lors du chargement de la page
|
// Initialiser les liens lors du chargement de la page
|
||||||
document.addEventListener('DOMContentLoaded', setupLinks);
|
document.addEventListener('DOMContentLoaded', setupLinks);
|
||||||
|
@ -1,169 +1,169 @@
|
|||||||
|
|
||||||
function editFieldUsername(id) {
|
function editFieldUsername(id) {
|
||||||
var pElement = document.getElementById(id);// Récupérer l'élément <p> via son identifiant
|
var pElement = document.getElementById(id);// Récupérer l'élément <p> via son identifiant
|
||||||
var currentValue = pElement.textContent.trim();// Obtenir le texte actuel du <p>
|
var currentValue = pElement.textContent.trim();// Obtenir le texte actuel du <p>
|
||||||
|
|
||||||
// Créer un champ de saisie <input> avec la valeur actuelle
|
// Créer un champ de saisie <input> avec la valeur actuelle
|
||||||
var input = document.createElement('input');
|
var input = document.createElement('input');
|
||||||
input.type = 'text';
|
input.type = 'text';
|
||||||
input.value = currentValue
|
input.value = currentValue
|
||||||
input.class = 'changeValue';
|
input.class = 'changeValue';
|
||||||
|
|
||||||
input.setAttribute('onblur', 'saveFieldUsername("' + id + '", this.value)'); // Sauvegarde lors de la perte de focus
|
input.setAttribute('onblur', 'saveFieldUsername("' + id + '", this.value)'); // Sauvegarde lors de la perte de focus
|
||||||
|
|
||||||
// Remplacer le <p> par le champ <input>
|
// Remplacer le <p> par le champ <input>
|
||||||
pElement.innerHTML = '';
|
pElement.innerHTML = '';
|
||||||
pElement.appendChild(input);
|
pElement.appendChild(input);
|
||||||
|
|
||||||
input.focus(); // Mettre le focus sur le champ de saisie
|
input.focus(); // Mettre le focus sur le champ de saisie
|
||||||
}
|
}
|
||||||
|
|
||||||
//Sauvegarder les changements sur la vue pour le username
|
//Sauvegarder les changements sur la vue pour le username
|
||||||
function saveFieldUsername(id, newValue) {
|
function saveFieldUsername(id, newValue) {
|
||||||
if (id === 'username') {
|
if (id === 'username') {
|
||||||
if (newValue.trim() === "") {
|
if (newValue.trim() === "") {
|
||||||
alert('Le nom d\'utilisateur ne peut pas être vide.');
|
alert('Le nom d\'utilisateur ne peut pas être vide.');
|
||||||
document.getElementById(id).querySelector('input').focus();
|
document.getElementById(id).querySelector('input').focus();
|
||||||
return; // Ne pas sauvegarder si le nom d'utilisateur est vide
|
return; // Ne pas sauvegarder si le nom d'utilisateur est vide
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var pElement = document.getElementById(id);// Récupérer l'élément <p> via son identifiant
|
var pElement = document.getElementById(id);// Récupérer l'élément <p> via son identifiant
|
||||||
|
|
||||||
// Mettre à jour la valeur avec la nouvelle saisie
|
// Mettre à jour la valeur avec la nouvelle saisie
|
||||||
pElement.innerHTML = '<strong>' + newValue + ' <img class="imgModify" src="../images/modify.svg" onclick="editFieldUsername(\'' + id + '\')"/></strong>';
|
pElement.innerHTML = '<strong>' + newValue + ' <img class="imgModify" src="../images/modify.svg" onclick="editFieldUsername(\'' + id + '\')"/></strong>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function editFieldEmail(id) {
|
function editFieldEmail(id) {
|
||||||
var pElement = document.getElementById(id);// Récupérer l'élément <p> via son identifiant
|
var pElement = document.getElementById(id);// Récupérer l'élément <p> via son identifiant
|
||||||
var currentValue = pElement.textContent.trim();// Obtenir le texte actuel du <p>
|
var currentValue = pElement.textContent.trim();// Obtenir le texte actuel du <p>
|
||||||
|
|
||||||
// Créer un champ de saisie <input> avec la valeur actuelle
|
// Créer un champ de saisie <input> avec la valeur actuelle
|
||||||
var input = document.createElement('input');
|
var input = document.createElement('input');
|
||||||
input.type = 'email';
|
input.type = 'email';
|
||||||
input.value = currentValue
|
input.value = currentValue
|
||||||
input.class = 'changeValue';
|
input.class = 'changeValue';
|
||||||
|
|
||||||
input.setAttribute('onblur', 'saveFieldEmail("' + id + '", this.value)'); // Sauvegarde lors de la perte de focus
|
input.setAttribute('onblur', 'saveFieldEmail("' + id + '", this.value)'); // Sauvegarde lors de la perte de focus
|
||||||
|
|
||||||
// Remplacer le <p> par le champ <input>
|
// Remplacer le <p> par le champ <input>
|
||||||
pElement.innerHTML = '';
|
pElement.innerHTML = '';
|
||||||
pElement.appendChild(input);
|
pElement.appendChild(input);
|
||||||
|
|
||||||
input.focus(); // Mettre le focus sur le champ de saisie
|
input.focus(); // Mettre le focus sur le champ de saisie
|
||||||
}
|
}
|
||||||
|
|
||||||
//Sauvegarder les changements sur la vue pour l'email
|
//Sauvegarder les changements sur la vue pour l'email
|
||||||
function saveFieldEmail(id, newValue) {
|
function saveFieldEmail(id, newValue) {
|
||||||
if (id === 'email') {
|
if (id === 'email') {
|
||||||
if (!validateEmail(newValue)) {
|
if (!validateEmail(newValue)) {
|
||||||
alert('Adresse email invalide. Veuillez entrer un email valide.');
|
alert('Adresse email invalide. Veuillez entrer un email valide.');
|
||||||
document.getElementById(id).querySelector('input').focus();
|
document.getElementById(id).querySelector('input').focus();
|
||||||
return; // Ne pas sauvegarder si l'email n'est pas valide
|
return; // Ne pas sauvegarder si l'email n'est pas valide
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (id === 'username') {
|
if (id === 'username') {
|
||||||
if (newValue.trim() === "") {
|
if (newValue.trim() === "") {
|
||||||
alert('Le nom d\'utilisateur ne peut pas être vide.');
|
alert('Le nom d\'utilisateur ne peut pas être vide.');
|
||||||
document.getElementById(id).querySelector('input').focus();
|
document.getElementById(id).querySelector('input').focus();
|
||||||
return; // Ne pas sauvegarder si le nom d'utilisateur est vide
|
return; // Ne pas sauvegarder si le nom d'utilisateur est vide
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var pElement = document.getElementById(id); // Récupérer l'élément <p> via son identifiant
|
var pElement = document.getElementById(id); // Récupérer l'élément <p> via son identifiant
|
||||||
|
|
||||||
// Mettre à jour la valeur avec la nouvelle saisie
|
// Mettre à jour la valeur avec la nouvelle saisie
|
||||||
pElement.innerHTML = '<strong>' + newValue + ' <img class="imgModify" src="../images/modify.svg" onclick="editFieldEmail(\'' + id + '\')"/></strong>';
|
pElement.innerHTML = '<strong>' + newValue + ' <img class="imgModify" src="../images/modify.svg" onclick="editFieldEmail(\'' + id + '\')"/></strong>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Email valide
|
//Email valide
|
||||||
function validateEmail(email) {
|
function validateEmail(email) {
|
||||||
var re = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;// Regex pour vérifier le format de l'email
|
var re = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;// Regex pour vérifier le format de l'email
|
||||||
return re.test(String(email).toLowerCase());
|
return re.test(String(email).toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function editFieldPassWd(id) {
|
function editFieldPassWd(id) {
|
||||||
var pElement = document.getElementById(id);// Récupérer l'élément <p> via son identifiant
|
var pElement = document.getElementById(id);// Récupérer l'élément <p> via son identifiant
|
||||||
|
|
||||||
pElement.innerHTML = '';// Effacer le contenu actuel de <p> pour insérer les inputs
|
pElement.innerHTML = '';// Effacer le contenu actuel de <p> pour insérer les inputs
|
||||||
|
|
||||||
// Créer le champ de saisie pour le nouveau mot de passe
|
// Créer le champ de saisie pour le nouveau mot de passe
|
||||||
var inputNewPass = document.createElement('input');
|
var inputNewPass = document.createElement('input');
|
||||||
inputNewPass.type = 'password';
|
inputNewPass.type = 'password';
|
||||||
inputNewPass.placeholder = 'Nouveau mot de passe'; // Un placeholder pour indiquer la fonction du champ
|
inputNewPass.placeholder = 'Nouveau mot de passe'; // Un placeholder pour indiquer la fonction du champ
|
||||||
inputNewPass.classList.add('changeValue'); // Ajouter une classe CSS pour styliser l'input
|
inputNewPass.classList.add('changeValue'); // Ajouter une classe CSS pour styliser l'input
|
||||||
inputNewPass.setAttribute('id', 'newPassword'); // Ajouter un ID pour la gestion
|
inputNewPass.setAttribute('id', 'newPassword'); // Ajouter un ID pour la gestion
|
||||||
inputNewPass.classList.add('inputPasswd'); // Ajouter une classe au input
|
inputNewPass.classList.add('inputPasswd'); // Ajouter une classe au input
|
||||||
|
|
||||||
|
|
||||||
// Créer le champ de saisie pour la confirmation du mot de passe
|
// Créer le champ de saisie pour la confirmation du mot de passe
|
||||||
var inputConfirmPass = document.createElement('input');
|
var inputConfirmPass = document.createElement('input');
|
||||||
inputConfirmPass.type = 'password';
|
inputConfirmPass.type = 'password';
|
||||||
inputConfirmPass.placeholder = 'Confirmer le mot de passe'; // Un placeholder pour indiquer la fonction du champ
|
inputConfirmPass.placeholder = 'Confirmer le mot de passe'; // Un placeholder pour indiquer la fonction du champ
|
||||||
inputConfirmPass.classList.add('changeValue'); // Ajouter une classe CSS pour styliser l'input
|
inputConfirmPass.classList.add('changeValue'); // Ajouter une classe CSS pour styliser l'input
|
||||||
inputConfirmPass.setAttribute('id', 'confirmPassword'); // Ajouter un ID pour la gestion
|
inputConfirmPass.setAttribute('id', 'confirmPassword'); // Ajouter un ID pour la gestion
|
||||||
inputConfirmPass.classList.add('inputPasswd'); // Ajouter une classe au input
|
inputConfirmPass.classList.add('inputPasswd'); // Ajouter une classe au input
|
||||||
|
|
||||||
// Ajouter un bouton de sauvegarde
|
// Ajouter un bouton de sauvegarde
|
||||||
var saveButton = document.createElement('button');
|
var saveButton = document.createElement('button');
|
||||||
saveButton.textContent = 'Sauvegarder le mot de passe';
|
saveButton.textContent = 'Sauvegarder le mot de passe';
|
||||||
saveButton.classList.add('saveButtonPasswd'); // Ajouter une classe au bouton
|
saveButton.classList.add('saveButtonPasswd'); // Ajouter une classe au bouton
|
||||||
|
|
||||||
saveButton.onclick = function() {
|
saveButton.onclick = function() {
|
||||||
savePasswordFields(id, inputNewPass.value, inputConfirmPass.value);
|
savePasswordFields(id, inputNewPass.value, inputConfirmPass.value);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Ajouter les deux champs de saisie et le bouton dans l'élément <p>
|
// Ajouter les deux champs de saisie et le bouton dans l'élément <p>
|
||||||
pElement.appendChild(inputNewPass);
|
pElement.appendChild(inputNewPass);
|
||||||
pElement.appendChild(document.createElement('br')); // Saut de ligne pour espacer les champs
|
pElement.appendChild(document.createElement('br')); // Saut de ligne pour espacer les champs
|
||||||
pElement.appendChild(inputConfirmPass);
|
pElement.appendChild(inputConfirmPass);
|
||||||
pElement.appendChild(document.createElement('br')); // Saut de ligne pour espacer
|
pElement.appendChild(document.createElement('br')); // Saut de ligne pour espacer
|
||||||
pElement.appendChild(saveButton);
|
pElement.appendChild(saveButton);
|
||||||
|
|
||||||
inputNewPass.focus();// Mettre le focus sur le premier champ de saisie
|
inputNewPass.focus();// Mettre le focus sur le premier champ de saisie
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function savePasswordFields(id, newPassword, confirmPassword) {
|
function savePasswordFields(id, newPassword, confirmPassword) {
|
||||||
// Vérification si les champs sont vides
|
// Vérification si les champs sont vides
|
||||||
if (newPassword.trim() === "" || confirmPassword.trim() === ""){
|
if (newPassword.trim() === "" || confirmPassword.trim() === ""){
|
||||||
alert("Les champs de mot de passe ne doivent pas être vides.");
|
alert("Les champs de mot de passe ne doivent pas être vides.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vérification de la correspondance des deux mots de passe
|
// Vérification de la correspondance des deux mots de passe
|
||||||
if (newPassword === confirmPassword) {
|
if (newPassword === confirmPassword) {
|
||||||
|
|
||||||
var pElement = document.getElementById(id);// Récupérer l'élément <p> via son identifiant
|
var pElement = document.getElementById(id);// Récupérer l'élément <p> via son identifiant
|
||||||
|
|
||||||
if(newPassword.length >= 16){
|
if(newPassword.length >= 16){
|
||||||
var maskedPassword = '*'.repeat(16); // Masquer le nouveau mot de passe pour l'affichage
|
var maskedPassword = '*'.repeat(16); // Masquer le nouveau mot de passe pour l'affichage
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
var maskedPassword = "*".repeat(newPassword.length); // Masquer le nouveau mot de passe pour l'affichage
|
var maskedPassword = "*".repeat(newPassword.length); // Masquer le nouveau mot de passe pour l'affichage
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remplacer les champs input par le texte masqué
|
// Remplacer les champs input par le texte masqué
|
||||||
pElement.innerHTML = '<strong>' + maskedPassword + '</strong> <img class="imgModify" src="../images/modify.svg" onclick="editFieldPassWd(\'' + id + '\')"/></strong>';
|
pElement.innerHTML = '<strong>' + maskedPassword + '</strong> <img class="imgModify" src="../images/modify.svg" onclick="editFieldPassWd(\'' + id + '\')"/></strong>';
|
||||||
alert('Mot de passe mis à jour avec succès');
|
alert('Mot de passe mis à jour avec succès');
|
||||||
|
|
||||||
// Possibilité d'ajouter ici une fonction pour envoyer les nouveaux mots de passe au serveur
|
// Possibilité d'ajouter ici une fonction pour envoyer les nouveaux mots de passe au serveur
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
alert('Les mots de passe ne correspondent pas.');
|
alert('Les mots de passe ne correspondent pas.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,51 +1,51 @@
|
|||||||
// Quand le document est prêt
|
// Quand le document est prêt
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
const themeIcon = document.getElementById('theme-icon');
|
const themeIcon = document.getElementById('theme-icon');
|
||||||
const favicon = document.getElementById('favicon'); // Sélectionne la favicon
|
const favicon = document.getElementById('favicon'); // Sélectionne la favicon
|
||||||
|
|
||||||
// Vérifie si les éléments existent bien avant d'y accéder
|
// Vérifie si les éléments existent bien avant d'y accéder
|
||||||
if (themeIcon && favicon) {
|
if (themeIcon && favicon) {
|
||||||
const currentTheme = localStorage.getItem('theme') || 'dark'; // Par défaut, sombre
|
const currentTheme = localStorage.getItem('theme') || 'dark'; // Par défaut, sombre
|
||||||
|
|
||||||
// Applique le bon thème au chargement de la page
|
// Applique le bon thème au chargement de la page
|
||||||
if (currentTheme === 'light') {
|
if (currentTheme === 'light') {
|
||||||
document.body.classList.remove('dark-mode');
|
document.body.classList.remove('dark-mode');
|
||||||
document.body.classList.add('light-mode');
|
document.body.classList.add('light-mode');
|
||||||
themeIcon.src = 'images/light.svg'; // Affiche l'icône pour basculer vers le mode sombre
|
themeIcon.src = 'images/light.svg'; // Affiche l'icône pour basculer vers le mode sombre
|
||||||
favicon.href = 'images/iconeClaire.ico'; // Favicon pour le mode clair
|
favicon.href = 'images/iconeClaire.ico'; // Favicon pour le mode clair
|
||||||
} else {
|
} else {
|
||||||
document.body.classList.add('dark-mode');
|
document.body.classList.add('dark-mode');
|
||||||
themeIcon.src = 'images/dark.svg'; // Affiche l'icône pour basculer vers le mode clair
|
themeIcon.src = 'images/dark.svg'; // Affiche l'icône pour basculer vers le mode clair
|
||||||
favicon.href = 'images/iconeSombre.ico'; // Favicon pour le mode sombre
|
favicon.href = 'images/iconeSombre.ico'; // Favicon pour le mode sombre
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.error("Élément(s) manquant(s) : icône du thème ou favicon.");
|
console.error("Élément(s) manquant(s) : icône du thème ou favicon.");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Fonction pour basculer entre les thèmes
|
// Fonction pour basculer entre les thèmes
|
||||||
function toggleTheme() {
|
function toggleTheme() {
|
||||||
const body = document.body;
|
const body = document.body;
|
||||||
const themeIcon = document.getElementById('theme-icon');
|
const themeIcon = document.getElementById('theme-icon');
|
||||||
const favicon = document.getElementById('favicon'); // Sélectionne la favicon
|
const favicon = document.getElementById('favicon'); // Sélectionne la favicon
|
||||||
|
|
||||||
if (themeIcon && favicon) {
|
if (themeIcon && favicon) {
|
||||||
if (body.classList.contains('dark-mode')) {
|
if (body.classList.contains('dark-mode')) {
|
||||||
// Si on est en mode sombre, on passe en mode clair
|
// Si on est en mode sombre, on passe en mode clair
|
||||||
body.classList.remove('dark-mode');
|
body.classList.remove('dark-mode');
|
||||||
body.classList.add('light-mode');
|
body.classList.add('light-mode');
|
||||||
themeIcon.src = 'images/light.svg'; // Change vers le logo sombre
|
themeIcon.src = 'images/light.svg'; // Change vers le logo sombre
|
||||||
favicon.href = 'images/iconeClaire.ico'; // Favicon pour le mode clair
|
favicon.href = 'images/iconeClaire.ico'; // Favicon pour le mode clair
|
||||||
localStorage.setItem('theme', 'light'); // Enregistre le thème clair dans localStorage
|
localStorage.setItem('theme', 'light'); // Enregistre le thème clair dans localStorage
|
||||||
} else {
|
} else {
|
||||||
// Sinon, on repasse en mode sombre
|
// Sinon, on repasse en mode sombre
|
||||||
body.classList.remove('light-mode');
|
body.classList.remove('light-mode');
|
||||||
body.classList.add('dark-mode');
|
body.classList.add('dark-mode');
|
||||||
themeIcon.src = 'images/dark.svg'; // Change vers le logo clair
|
themeIcon.src = 'images/dark.svg'; // Change vers le logo clair
|
||||||
favicon.href = 'images/iconeSombre.ico'; // Favicon pour le mode sombre
|
favicon.href = 'images/iconeSombre.ico'; // Favicon pour le mode sombre
|
||||||
localStorage.setItem('theme', 'dark'); // Enregistre le thème sombre dans localStorage
|
localStorage.setItem('theme', 'dark'); // Enregistre le thème sombre dans localStorage
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.error("Impossible de trouver l'icône ou le favicon.");
|
console.error("Impossible de trouver l'icône ou le favicon.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
const quoteElements = document.querySelectorAll('.citation-container .quote');
|
const quoteElements = document.querySelectorAll('.citation-container .quote');
|
||||||
|
|
||||||
quoteElements.forEach(quote => {
|
quoteElements.forEach(quote => {
|
||||||
let maxLength = 135; // Nombre max de caractères avant la coupure
|
let maxLength = 135; // Nombre max de caractères avant la coupure
|
||||||
if (quote.textContent.length > maxLength) {
|
if (quote.textContent.length > maxLength) {
|
||||||
let displayedText = quote.textContent.slice(0, maxLength) + '...\"';
|
let displayedText = quote.textContent.slice(0, maxLength) + '...\"';
|
||||||
quote.textContent = displayedText;
|
quote.textContent = displayedText;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,145 +1,166 @@
|
|||||||
/* header.css */
|
/* header.css */
|
||||||
|
|
||||||
/* Styles généraux */
|
/* Styles généraux */
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: #120b1d;
|
background-color: #120b1d;
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
margin-top: 200px;
|
margin-top: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Header */
|
/* Header */
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
background-color: #000000;
|
background-color: #000000;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
vertical-align: center;
|
vertical-align: center;
|
||||||
gap: 30px;
|
gap: 30px;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user {
|
.user {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
vertical-align: center;
|
vertical-align: center;
|
||||||
gap: 30px;
|
gap: 30px;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mode sombre */
|
.search {
|
||||||
body.dark-mode {
|
display: flex;
|
||||||
background-color: #120B1D;
|
flex-direction: row;
|
||||||
color: #ffffff;
|
justify-content: center;
|
||||||
}
|
align-items: center;
|
||||||
|
vertical-align: center;
|
||||||
body.dark-mode .header {
|
margin: 10px;
|
||||||
background-color: #000;
|
width: 70px;
|
||||||
}
|
height: 70px;
|
||||||
|
border-radius: 50%;
|
||||||
body.dark-mode .header img {
|
}
|
||||||
filter: invert(0%);
|
|
||||||
}
|
|
||||||
|
/* Mode sombre */
|
||||||
body.dark-mode .nav img:hover {
|
body.dark-mode {
|
||||||
filter: invert(59%) sepia(96%) saturate(6733%) hue-rotate(275deg) brightness(112%) contrast(122%);
|
background-color: #120B1D;
|
||||||
}
|
color: #ffffff;
|
||||||
|
}
|
||||||
/* Mode clair */
|
|
||||||
body.light-mode {
|
body.dark-mode .header {
|
||||||
background-color: #ffffff;
|
background-color: #000;
|
||||||
color: #000000;
|
}
|
||||||
}
|
|
||||||
|
body.dark-mode .header img {
|
||||||
body.light-mode .header {
|
filter: invert(0%);
|
||||||
background-color: #F7F7EB;
|
}
|
||||||
}
|
|
||||||
|
body.dark-mode .nav img:hover {
|
||||||
body.light-mode .header img {
|
filter: invert(59%) sepia(96%) saturate(6733%) hue-rotate(275deg) brightness(112%) contrast(122%);
|
||||||
filter: invert(100%);
|
}
|
||||||
}
|
|
||||||
|
body.dark-mode .search {
|
||||||
body.light-mode .nav img:hover {
|
background: linear-gradient(to right, #4a148c, #7b1fa2);
|
||||||
filter: invert(22%) sepia(6%) saturate(2269%) hue-rotate(193deg) brightness(98%) contrast(106%);
|
}
|
||||||
}
|
|
||||||
|
/* Mode clair */
|
||||||
/* Media queries for responsiveness */
|
body.light-mode {
|
||||||
|
background-color: #ffffff;
|
||||||
/* For tablets and small devices */
|
color: #000000;
|
||||||
@media (max-width: 768px) {
|
}
|
||||||
.header {
|
|
||||||
flex-direction: column;
|
body.light-mode .header {
|
||||||
text-align: center;
|
background-color: #F7F7EB;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav, .logo, .user {
|
body.light-mode .header img {
|
||||||
width: 100%;
|
filter: invert(100%);
|
||||||
margin-bottom: 10px;
|
}
|
||||||
}
|
|
||||||
}
|
body.light-mode .nav img:hover {
|
||||||
|
filter: invert(22%) sepia(6%) saturate(2269%) hue-rotate(193deg) brightness(98%) contrast(106%);
|
||||||
/* For mobile phones */
|
}
|
||||||
@media (max-width: 480px) {
|
|
||||||
body {
|
body.light-mode .search {
|
||||||
margin-top: 100px;
|
background: linear-gradient(180deg, rgba(187,211,249,1) 0%, rgba(199,246,196,1) 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav img, .logo img {
|
/* Media queries for responsiveness */
|
||||||
width: 50px;
|
|
||||||
height: auto;
|
/* For tablets and small devices */
|
||||||
}
|
@media (max-width: 768px) {
|
||||||
|
.header {
|
||||||
.container {
|
flex-direction: column;
|
||||||
padding: 10px;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
form {
|
.nav, .logo, .user {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
form input {
|
}
|
||||||
width: 100%;
|
|
||||||
padding: 10px;
|
/* For mobile phones */
|
||||||
margin-bottom: 10px;
|
@media (max-width: 480px) {
|
||||||
}
|
body {
|
||||||
}
|
margin-top: 100px;
|
||||||
|
}
|
||||||
/* Banner images should be responsive */
|
|
||||||
.header img {
|
.nav img, .logo img {
|
||||||
max-width: 100%;
|
width: 50px;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Media queries for different screen sizes */
|
.container {
|
||||||
@media (max-width: 768px) {
|
padding: 10px;
|
||||||
.header {
|
}
|
||||||
flex-direction: column;
|
|
||||||
}
|
form {
|
||||||
.header img {
|
width: 100%;
|
||||||
width: 80px;
|
}
|
||||||
height: auto;
|
|
||||||
}
|
form input {
|
||||||
}
|
width: 100%;
|
||||||
|
padding: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Banner images should be responsive */
|
||||||
|
.header img {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Media queries for different screen sizes */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.header {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.header img {
|
||||||
|
width: 80px;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,226 +1,226 @@
|
|||||||
@import url(./style.css);
|
@import url(./style.css);
|
||||||
|
|
||||||
/* ====== DARK MODE ====== */
|
/* ====== DARK MODE ====== */
|
||||||
body.dark-mode h1{
|
body.dark-mode h1{
|
||||||
color : white;
|
color : white;
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 35px;
|
font-size: 35px;
|
||||||
margin-top: 10%;
|
margin-top: 10%;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.dark-mode p{
|
body.dark-mode p{
|
||||||
margin-top: 6%;
|
margin-top: 6%;
|
||||||
margin-bottom: 2%;
|
margin-bottom: 2%;
|
||||||
color : white;
|
color : white;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
body.dark-mode .buttonSudmite{
|
body.dark-mode .buttonSudmite{
|
||||||
background: linear-gradient(90deg, #6100ff 0%, #1b0048 100%);
|
background: linear-gradient(90deg, #6100ff 0%, #1b0048 100%);
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
border: none;
|
border: none;
|
||||||
color: white;
|
color: white;
|
||||||
padding: 5%;
|
padding: 5%;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
width: 75%;
|
width: 75%;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.dark-mode .createQuote{
|
body.dark-mode .createQuote{
|
||||||
margin-top: 5%;
|
margin-top: 5%;
|
||||||
margin-bottom: 5%;
|
margin-bottom: 5%;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 1%;
|
padding-top: 1%;
|
||||||
color: white;
|
color: white;
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.dark-mode .login{
|
body.dark-mode .login{
|
||||||
background-color: black;
|
background-color: black;
|
||||||
width: 30%;
|
width: 30%;
|
||||||
margin-left: 35%;
|
margin-left: 35%;
|
||||||
margin-top: 9%;
|
margin-top: 9%;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom: 1%;
|
padding-bottom: 1%;
|
||||||
border: 2px solid transparent;
|
border: 2px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.dark-mode .imgModify{
|
body.dark-mode .imgModify{
|
||||||
width: 3%;
|
width: 3%;
|
||||||
margin-left: 5%;
|
margin-left: 5%;
|
||||||
margin-top: 5%;
|
margin-top: 5%;
|
||||||
filter: invert(100%) brightness(1000%) contrast(1000%);
|
filter: invert(100%) brightness(1000%) contrast(1000%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
body.dark-mode .infoProfil > input {
|
body.dark-mode .infoProfil > input {
|
||||||
width:90%;
|
width:90%;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
padding-left: 3%;
|
padding-left: 3%;
|
||||||
margin-left: 1%;
|
margin-left: 1%;
|
||||||
margin-top: -1%;
|
margin-top: -1%;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
border: none;
|
border: none;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
body.dark-mode .inputPasswd{
|
body.dark-mode .inputPasswd{
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
margin-top: 40%;
|
margin-top: 40%;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.dark-mode .saveButtonPasswd {
|
body.dark-mode .saveButtonPasswd {
|
||||||
background: linear-gradient(90deg, #6100ff 0%, #1b0048 100%);
|
background: linear-gradient(90deg, #6100ff 0%, #1b0048 100%);
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
border: none;
|
border: none;
|
||||||
color: white;
|
color: white;
|
||||||
padding: 1%;
|
padding: 1%;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
width: 55%;
|
width: 55%;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
margin-top: 5%;
|
margin-top: 5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ====== LIGHT MODE ====== */
|
/* ====== LIGHT MODE ====== */
|
||||||
body.light-mode h1{
|
body.light-mode h1{
|
||||||
color : black;
|
color : black;
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 35px;
|
font-size: 35px;
|
||||||
margin-top: 10%;
|
margin-top: 10%;
|
||||||
}
|
}
|
||||||
body.light-mode p{
|
body.light-mode p{
|
||||||
margin-top: 6%;
|
margin-top: 6%;
|
||||||
margin-bottom: 2%;
|
margin-bottom: 2%;
|
||||||
color : black;
|
color : black;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
body.light-mode .buttonSudmite{
|
body.light-mode .buttonSudmite{
|
||||||
background: linear-gradient(180deg, rgba(187,211,249,1) 0%, rgba(199,246,196,1) 100%);
|
background: linear-gradient(180deg, rgba(187,211,249,1) 0%, rgba(199,246,196,1) 100%);
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
border: none;
|
border: none;
|
||||||
color: black;
|
color: black;
|
||||||
padding: 5%;
|
padding: 5%;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
width: 75%;
|
width: 75%;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body.light-mode .createQuote{
|
body.light-mode .createQuote{
|
||||||
margin-top: 5%;
|
margin-top: 5%;
|
||||||
margin-bottom: 5%;
|
margin-bottom: 5%;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 1%;
|
padding-top: 1%;
|
||||||
color: black;
|
color: black;
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.light-mode .login{
|
body.light-mode .login{
|
||||||
background-color: white;
|
background-color: white;
|
||||||
width: 30%;
|
width: 30%;
|
||||||
margin-left: 35%;
|
margin-left: 35%;
|
||||||
margin-top: 9%;
|
margin-top: 9%;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom: 1%;
|
padding-bottom: 1%;
|
||||||
border: 2px solid black;
|
border: 2px solid black;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.light-mode .imgModify{
|
body.light-mode .imgModify{
|
||||||
width: 3%;
|
width: 3%;
|
||||||
margin-left: 5%;
|
margin-left: 5%;
|
||||||
margin-top: 5%;
|
margin-top: 5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
body.light-mode .infoProfil > input {
|
body.light-mode .infoProfil > input {
|
||||||
width:90%;
|
width:90%;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
padding-left: 3%;
|
padding-left: 3%;
|
||||||
margin-left: 1%;
|
margin-left: 1%;
|
||||||
margin-top: -1%;
|
margin-top: -1%;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
background-color: #fff1f1;
|
background-color: #fff1f1;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
color : black;
|
color : black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
body.light-mode .inputPasswd{
|
body.light-mode .inputPasswd{
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
margin-top: 40%;
|
margin-top: 40%;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.light-mode .saveButtonPasswd {
|
body.light-mode .saveButtonPasswd {
|
||||||
background: linear-gradient(180deg, rgba(187,211,249,1) 0%, rgba(199,246,196,1) 100%);
|
background: linear-gradient(180deg, rgba(187,211,249,1) 0%, rgba(199,246,196,1) 100%);
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
border: none;
|
border: none;
|
||||||
color: black;
|
color: black;
|
||||||
padding: 1%;
|
padding: 1%;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
width: 55%;
|
width: 55%;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
margin-top: 5%;
|
margin-top: 5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ====== OTHER ====== */
|
/* ====== OTHER ====== */
|
||||||
.buttonSudmiteDiv{
|
.buttonSudmiteDiv{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.changeValue{
|
.changeValue{
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.imageProfil{
|
.imageProfil{
|
||||||
width: 25%;
|
width: 25%;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
display:block;
|
display:block;
|
||||||
margin-left: 38%;
|
margin-left: 38%;
|
||||||
margin-top: 5%;
|
margin-top: 5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.infoProfil{
|
.infoProfil{
|
||||||
margin-left: 10%;
|
margin-left: 10%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 120%;
|
font-size: 120%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.languageDiv{
|
.languageDiv{
|
||||||
margin-left: 25%;
|
margin-left: 25%;
|
||||||
}
|
}
|
||||||
.languageTitle{
|
.languageTitle{
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
}
|
}
|
||||||
.languageImage{
|
.languageImage{
|
||||||
width: 300px;
|
width: 300px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin-left: 25%;
|
margin-left: 25%;
|
||||||
display:block;
|
display:block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,154 +1,154 @@
|
|||||||
@import url(./style.css);
|
@import url(./style.css);
|
||||||
|
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Lemon&display=swap');
|
@import url('https://fonts.googleapis.com/css2?family=Lemon&display=swap');
|
||||||
|
|
||||||
body, html {
|
body, html {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ====== DARK MODE ====== */
|
/* ====== DARK MODE ====== */
|
||||||
body.dark-mode h1, body.dark-mode h2, body.dark-mode p {
|
body.dark-mode h1, body.dark-mode h2, body.dark-mode p {
|
||||||
color: white;
|
color: white;
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.dark-mode .quiz {
|
body.dark-mode .quiz {
|
||||||
background-color: black;
|
background-color: black;
|
||||||
height: 60%;
|
height: 60%;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
margin: 3% auto;
|
margin: 3% auto;
|
||||||
padding: 2%;
|
padding: 2%;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
border: 2px solid transparent;
|
border: 2px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.dark-mode .answers {
|
body.dark-mode .answers {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
|
|
||||||
row-gap: 80px;
|
row-gap: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.dark-mode .answer {
|
body.dark-mode .answer {
|
||||||
background-color: #1b0048;
|
background-color: #1b0048;
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
width: 35%;
|
width: 35%;
|
||||||
padding: 35px;
|
padding: 35px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.dark-mode .answer:hover {
|
body.dark-mode .answer:hover {
|
||||||
background-color: #6100ff;
|
background-color: #6100ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.dark-mode .submit-button {
|
body.dark-mode .submit-button {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 80px;
|
margin-top: 80px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body.dark-mode .buttonSudmite {
|
body.dark-mode .buttonSudmite {
|
||||||
background: linear-gradient(90deg, #6100ff 0%, #1b0048 100%);
|
background: linear-gradient(90deg, #6100ff 0%, #1b0048 100%);
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
border: none;
|
border: none;
|
||||||
color: white;
|
color: white;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ====== LIGHT MODE ====== */
|
/* ====== LIGHT MODE ====== */
|
||||||
body.light-mode h1, body.light-mode h2, body.light-mode p {
|
body.light-mode h1, body.light-mode h2, body.light-mode p {
|
||||||
color: black;
|
color: black;
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.light-mode .quiz {
|
body.light-mode .quiz {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
height: 90%;
|
height: 90%;
|
||||||
margin: 3% auto;
|
margin: 3% auto;
|
||||||
padding: 2%;
|
padding: 2%;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
border: 2px solid black;
|
border: 2px solid black;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.light-mode .answers {
|
body.light-mode .answers {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
gap: 1000px;
|
gap: 1000px;
|
||||||
height: 90%;
|
height: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.light-mode .answer {
|
body.light-mode .answer {
|
||||||
background-color: #fff1f1;
|
background-color: #fff1f1;
|
||||||
color: black;
|
color: black;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
width: 45%;
|
width: 45%;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.light-mode .answer:hover {
|
body.light-mode .answer:hover {
|
||||||
background-color: #c7f6c4;
|
background-color: #c7f6c4;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.light-mode .submit-button {
|
body.light-mode .submit-button {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.light-mode .buttonSudmite {
|
body.light-mode .buttonSudmite {
|
||||||
background: linear-gradient(180deg, rgba(187,211,249,1) 0%, rgba(199,246,196,1) 100%);
|
background: linear-gradient(180deg, rgba(187,211,249,1) 0%, rgba(199,246,196,1) 100%);
|
||||||
font-family: "Lemon", serif;
|
font-family: "Lemon", serif;
|
||||||
border: none;
|
border: none;
|
||||||
color: black;
|
color: black;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ====== OTHER ====== */
|
/* ====== OTHER ====== */
|
||||||
.container {
|
.container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 50px;
|
margin-bottom: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav img {
|
.nav img {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo img {
|
.logo img {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user img {
|
.user img {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
@ -1,110 +1,110 @@
|
|||||||
@import url(./style.css);
|
@import url(./style.css);
|
||||||
|
|
||||||
/* ====== DARK MODE ====== */
|
/* ====== DARK MODE ====== */
|
||||||
body.dark-mode .card {
|
body.dark-mode .card {
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
width: 60%;
|
width: 60%;
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-left: 5%;
|
margin-left: 5%;
|
||||||
border: 2px solid transparent;
|
border: 2px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
body.dark-mode .card-content {
|
body.dark-mode .card-content {
|
||||||
color: white;
|
color: white;
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
body.dark-mode .likes {
|
body.dark-mode .likes {
|
||||||
margin-left: 85%;
|
margin-left: 85%;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.dark-mode .like-icon {
|
body.dark-mode .like-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
font-size: 35px;
|
font-size: 35px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.dark-mode .share-icon {
|
body.dark-mode .share-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 70px;
|
top: 70px;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
font-size: 35px;
|
font-size: 35px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ====== LIGHT MODE ====== */
|
/* ====== LIGHT MODE ====== */
|
||||||
|
|
||||||
body.light-mode .card {
|
body.light-mode .card {
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
width: 60%;
|
width: 60%;
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-left: 5%;
|
margin-left: 5%;
|
||||||
border: 2px solid black;
|
border: 2px solid black;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.light-mode .card-content {
|
body.light-mode .card-content {
|
||||||
color: black;
|
color: black;
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
body.light-mode .likes {
|
body.light-mode .likes {
|
||||||
margin-left: 85%;
|
margin-left: 85%;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.light-mode .like-icon {
|
body.light-mode .like-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
font-size: 35px;
|
font-size: 35px;
|
||||||
color: black;
|
color: black;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.light-mode .share-icon {
|
body.light-mode .share-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 70px;
|
top: 70px;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
font-size: 35px;
|
font-size: 35px;
|
||||||
color: black;
|
color: black;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ====== DEFAULT ====== */
|
/* ====== DEFAULT ====== */
|
||||||
.infoQuote {
|
.infoQuote {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
margin-top: 35%;
|
margin-top: 35%;
|
||||||
margin-left: -45%;
|
margin-left: -45%;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
.card-image {
|
.card-image {
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
width: 310px;
|
width: 310px;
|
||||||
height: 270px;
|
height: 270px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.quote {
|
.quote {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
font-size: 35px;
|
font-size: 35px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
@ -0,0 +1,111 @@
|
|||||||
|
/* Conteneur pour les suggestions en deux colonnes */
|
||||||
|
.quotes-container {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 90%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Citations */
|
||||||
|
.citation-container {
|
||||||
|
background: linear-gradient(to right, #4a148c, #7b1fa2);
|
||||||
|
border-radius: 12px;
|
||||||
|
color: white;
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
width: 49%; /* Chaque citation occupe 45% de la largeur pour laisser 5% d'espace */
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0;
|
||||||
|
height: 150px;
|
||||||
|
overflow: hidden;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
word-wrap: break-word; /* Permet de couper les mots trop longs */
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fixe la taille pour s'assurer que toutes les citations restent cohérentes */
|
||||||
|
.citation-container .text-content {
|
||||||
|
flex-grow: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
.quote {
|
||||||
|
background: linear-gradient(180deg, rgba(187,211,249,1) 0%, rgba(199,246,196,1) 100%);
|
||||||
|
padding: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.citation-image {
|
||||||
|
width: 150px;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
margin: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-content {
|
||||||
|
flex: 1;
|
||||||
|
padding: 10px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center; /* Centre verticalement le texte */
|
||||||
|
word-wrap: break-word; /* Permet de couper les mots trop longs */
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.quoteContent {
|
||||||
|
font-size: 1.2em;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.movie, .character, .year {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Mode sombre */
|
||||||
|
body.dark-mode .quote {
|
||||||
|
background: linear-gradient(to right, #4a148c, #7b1fa2);
|
||||||
|
color:white;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Mode clair */
|
||||||
|
body.light-mode .quote {
|
||||||
|
background: linear-gradient(180deg, rgba(187,211,249,1) 0%, rgba(199,246,196,1) 100%);
|
||||||
|
color:black; /* Changer le texte en noir pour le mode clair */
|
||||||
|
}
|
||||||
|
|
||||||
|
body.light-mode .quote,
|
||||||
|
body.light-mode .movie,
|
||||||
|
body.light-mode .character,
|
||||||
|
body.light-mode .year {
|
||||||
|
color: black; /* Forcer le texte en noir pour le mode clair */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Responsive design */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.suggestions-container {
|
||||||
|
flex-direction: column;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.citation-container {
|
||||||
|
width: 100%; /* Chaque citation prend toute la largeur sur mobile */
|
||||||
|
max-width: 100%;
|
||||||
|
height: 100px; /* Supprimer la hauteur fixe sur mobile */
|
||||||
|
}
|
||||||
|
|
||||||
|
.citation-image {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.quote {
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
@import url(./style.css);
|
||||||
|
@import url(./styleQuoteLittle.css);
|
||||||
|
|
||||||
|
/* ====== DEFAULT ====== */
|
||||||
|
|
||||||
|
|
||||||
|
.search-container {
|
||||||
|
margin-left: 5%;
|
||||||
|
width: 90%;
|
||||||
|
|
||||||
|
height: 60px;
|
||||||
|
border-radius: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-container .searchButton {
|
||||||
|
float: right;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.searchButton img{
|
||||||
|
width: 70%;
|
||||||
|
height: 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-container input[type="search"] {
|
||||||
|
margin: 10px ;
|
||||||
|
border:none;
|
||||||
|
background: none;
|
||||||
|
float:left;
|
||||||
|
padding: 0;
|
||||||
|
color: #00f;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 40px;
|
||||||
|
width:auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filtre{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ====== DARK MODE ====== */
|
||||||
|
/*body.dark-mode */
|
||||||
|
body.dark-mode .search-container {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
body.dark-mode .search-container input[type="search"] {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
body.dark-mode .search-container .searchButton {
|
||||||
|
background: linear-gradient(to right, #4a148c, #7b1fa2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ====== LIGHT MODE ====== */
|
||||||
|
/*body.light-mode*/
|
||||||
|
body.light-mode .search-container {
|
||||||
|
background: #ccc;
|
||||||
|
}
|
||||||
|
body.light-mode .search-container input[type="search"] {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
body.light-mode .search-container .searchButton {
|
||||||
|
background: linear-gradient(180deg, rgba(187,211,249,1) 0%, rgba(199,246,196,1) 100%);
|
||||||
|
}
|
@ -1,53 +1,53 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Entity;
|
namespace Entity;
|
||||||
|
|
||||||
class FavoriteEntity
|
class FavoriteEntity
|
||||||
{
|
{
|
||||||
private int $id_user;
|
private int $id_user;
|
||||||
private int $id_quote;
|
private int $id_quote;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id_user
|
* @param int $id_user
|
||||||
* @param int $id_quote
|
* @param int $id_quote
|
||||||
*/
|
*/
|
||||||
public function __construct(int $id_user, int $id_quote)
|
public function __construct(int $id_user, int $id_quote)
|
||||||
{
|
{
|
||||||
$this->id_user = $id_user;
|
$this->id_user = $id_user;
|
||||||
$this->id_quote = $id_quote;
|
$this->id_quote = $id_quote;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getIdUser(): int
|
public function getIdUser(): int
|
||||||
{
|
{
|
||||||
return $this->id_user;
|
return $this->id_user;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id_user
|
* @param int $id_user
|
||||||
*/
|
*/
|
||||||
public function setIdUser(int $id_user): void
|
public function setIdUser(int $id_user): void
|
||||||
{
|
{
|
||||||
$this->id_user = $id_user;
|
$this->id_user = $id_user;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getIdQuote(): int
|
public function getIdQuote(): int
|
||||||
{
|
{
|
||||||
return $this->id_quote;
|
return $this->id_quote;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id_quote
|
* @param int $id_quote
|
||||||
*/
|
*/
|
||||||
public function setIdQuote(int $id_quote): void
|
public function setIdQuote(int $id_quote): void
|
||||||
{
|
{
|
||||||
$this->id_quote = $id_quote;
|
$this->id_quote = $id_quote;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,53 +1,53 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Entity;
|
namespace Entity;
|
||||||
|
|
||||||
class ImageEntity
|
class ImageEntity
|
||||||
{
|
{
|
||||||
private int $idImg;
|
private int $idImg;
|
||||||
private string $imgPath;
|
private string $imgPath;
|
||||||
private string $isImgProfile;
|
private string $isImgProfile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $idImg
|
* @param int $idImg
|
||||||
* @param string $imgPath
|
* @param string $imgPath
|
||||||
* @param string $isImgProfile
|
* @param string $isImgProfile
|
||||||
*/
|
*/
|
||||||
public function __construct(int $idImg, string $imgPath, string $isImgProfile)
|
public function __construct(int $idImg, string $imgPath, string $isImgProfile)
|
||||||
{
|
{
|
||||||
$this->idImg = $idImg;
|
$this->idImg = $idImg;
|
||||||
$this->imgPath = $imgPath;
|
$this->imgPath = $imgPath;
|
||||||
$this->isImgProfile = $isImgProfile;
|
$this->isImgProfile = $isImgProfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getIdImg(): int
|
public function getIdImg(): int
|
||||||
{
|
{
|
||||||
return $this->idImg;
|
return $this->idImg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setIdImg(int $idImg): void
|
public function setIdImg(int $idImg): void
|
||||||
{
|
{
|
||||||
$this->idImg = $idImg;
|
$this->idImg = $idImg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getImgPath(): string
|
public function getImgPath(): string
|
||||||
{
|
{
|
||||||
return $this->imgPath;
|
return $this->imgPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setImgPath(string $imgPath): void
|
public function setImgPath(string $imgPath): void
|
||||||
{
|
{
|
||||||
$this->imgPath = $imgPath;
|
$this->imgPath = $imgPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getIsImgProfile(): string
|
public function getIsImgProfile(): string
|
||||||
{
|
{
|
||||||
return $this->isImgProfile;
|
return $this->isImgProfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setIsImgProfile(string $isImgProfile): void
|
public function setIsImgProfile(string $isImgProfile): void
|
||||||
{
|
{
|
||||||
$this->isImgProfile = $isImgProfile;
|
$this->isImgProfile = $isImgProfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,54 +1,54 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Entity;
|
namespace Entity;
|
||||||
|
|
||||||
|
|
||||||
class QuizQuestionEntity
|
class QuizQuestionEntity
|
||||||
{
|
{
|
||||||
private int $id_question;
|
private int $id_question;
|
||||||
private int $id_quiz;
|
private int $id_quiz;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id_question
|
* @param int $id_question
|
||||||
* @param int $id_quiz
|
* @param int $id_quiz
|
||||||
*/
|
*/
|
||||||
public function __construct(int $id_question, int $id_quiz)
|
public function __construct(int $id_question, int $id_quiz)
|
||||||
{
|
{
|
||||||
$this->id_question = $id_question;
|
$this->id_question = $id_question;
|
||||||
$this->id_quiz = $id_quiz;
|
$this->id_quiz = $id_quiz;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getIdQuestion(): int
|
public function getIdQuestion(): int
|
||||||
{
|
{
|
||||||
return $this->id_question;
|
return $this->id_question;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id_question
|
* @param int $id_question
|
||||||
*/
|
*/
|
||||||
public function setIdQuestion(int $id_question): void
|
public function setIdQuestion(int $id_question): void
|
||||||
{
|
{
|
||||||
$this->id_question = $id_question;
|
$this->id_question = $id_question;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getIdQuiz(): int
|
public function getIdQuiz(): int
|
||||||
{
|
{
|
||||||
return $this->id_quiz;
|
return $this->id_quiz;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id_quiz
|
* @param int $id_quiz
|
||||||
*/
|
*/
|
||||||
public function setIdQuiz(int $id_quiz): void
|
public function setIdQuiz(int $id_quiz): void
|
||||||
{
|
{
|
||||||
$this->id_quiz = $id_quiz;
|
$this->id_quiz = $id_quiz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,168 +1,168 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Entity;
|
namespace Entity;
|
||||||
|
|
||||||
class Quote{
|
class Quote{
|
||||||
|
|
||||||
private int $id;
|
private int $id;
|
||||||
private string $content;
|
private string $content;
|
||||||
private string $carac;
|
private string $carac;
|
||||||
private string $imgPath;
|
private string $imgPath;
|
||||||
private string $titleSrc;
|
private string $titleSrc;
|
||||||
private string $dateSrc;
|
private string $dateSrc;
|
||||||
private int $like;
|
private int $like;
|
||||||
private string $langue;
|
private string $langue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param string $content
|
* @param string $content
|
||||||
* @param string $carac
|
* @param string $carac
|
||||||
* @param string $imgPath
|
* @param string $imgPath
|
||||||
* @param string $titleSrc
|
* @param string $titleSrc
|
||||||
* @param string $dateSrc
|
* @param string $dateSrc
|
||||||
* @param int $like
|
* @param int $like
|
||||||
* @param string $langue
|
* @param string $langue
|
||||||
*/
|
*/
|
||||||
public function __construct(int $id, string $content, string $carac, string $imgPath, string $titleSrc, string $dateSrc, int $like, string $langue)
|
public function __construct(int $id, string $content, string $carac, string $imgPath, string $titleSrc, string $dateSrc, int $like, string $langue)
|
||||||
{
|
{
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
$this->content = $content;
|
$this->content = $content;
|
||||||
$this->carac = $carac;
|
$this->carac = $carac;
|
||||||
$this->imgPath = $imgPath;
|
$this->imgPath = $imgPath;
|
||||||
$this->titleSrc = $titleSrc;
|
$this->titleSrc = $titleSrc;
|
||||||
$this->dateSrc = $dateSrc;
|
$this->dateSrc = $dateSrc;
|
||||||
$this->like = $like;
|
$this->like = $like;
|
||||||
$this->langue = $langue;
|
$this->langue = $langue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getId(): int
|
public function getId(): int
|
||||||
{
|
{
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id
|
* @param int $id
|
||||||
*/
|
*/
|
||||||
public function setId(int $id): void
|
public function setId(int $id): void
|
||||||
{
|
{
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getContent(): string
|
public function getContent(): string
|
||||||
{
|
{
|
||||||
return $this->content;
|
return $this->content;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $content
|
* @param string $content
|
||||||
*/
|
*/
|
||||||
public function setContent(string $content): void
|
public function setContent(string $content): void
|
||||||
{
|
{
|
||||||
$this->content = $content;
|
$this->content = $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getCarac(): string
|
public function getCarac(): string
|
||||||
{
|
{
|
||||||
return $this->carac;
|
return $this->carac;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $carac
|
* @param string $carac
|
||||||
*/
|
*/
|
||||||
public function setCarac(string $carac): void
|
public function setCarac(string $carac): void
|
||||||
{
|
{
|
||||||
$this->carac = $carac;
|
$this->carac = $carac;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getImgPath(): string
|
public function getImgPath(): string
|
||||||
{
|
{
|
||||||
return $this->imgPath;
|
return $this->imgPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $imgPath
|
* @param string $imgPath
|
||||||
*/
|
*/
|
||||||
public function setImgPath(string $imgPath): void
|
public function setImgPath(string $imgPath): void
|
||||||
{
|
{
|
||||||
$this->imgPath = $imgPath;
|
$this->imgPath = $imgPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getTitleSrc(): string
|
public function getTitleSrc(): string
|
||||||
{
|
{
|
||||||
return $this->titleSrc;
|
return $this->titleSrc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $titleSrc
|
* @param string $titleSrc
|
||||||
*/
|
*/
|
||||||
public function setTitleSrc(string $titleSrc): void
|
public function setTitleSrc(string $titleSrc): void
|
||||||
{
|
{
|
||||||
$this->titleSrc = $titleSrc;
|
$this->titleSrc = $titleSrc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getDateSrc(): string
|
public function getDateSrc(): string
|
||||||
{
|
{
|
||||||
return $this->dateSrc;
|
return $this->dateSrc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $dateSrc
|
* @param string $dateSrc
|
||||||
*/
|
*/
|
||||||
public function setDateSrc(string $dateSrc): void
|
public function setDateSrc(string $dateSrc): void
|
||||||
{
|
{
|
||||||
$this->dateSrc = $dateSrc;
|
$this->dateSrc = $dateSrc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getLike(): int
|
public function getLike(): int
|
||||||
{
|
{
|
||||||
return $this->like;
|
return $this->like;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $like
|
* @param int $like
|
||||||
*/
|
*/
|
||||||
public function setLike(int $like): void
|
public function setLike(int $like): void
|
||||||
{
|
{
|
||||||
$this->like = $like;
|
$this->like = $like;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getLangue(): string
|
public function getLangue(): string
|
||||||
{
|
{
|
||||||
return $this->langue;
|
return $this->langue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $langue
|
* @param string $langue
|
||||||
*/
|
*/
|
||||||
public function setLangue(string $langue): void
|
public function setLangue(string $langue): void
|
||||||
{
|
{
|
||||||
$this->langue = $langue;
|
$this->langue = $langue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -1,69 +1,69 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Entity;
|
namespace Entity;
|
||||||
|
|
||||||
class ResultsEntity
|
class ResultsEntity
|
||||||
{
|
{
|
||||||
private int $idQuiz;
|
private int $idQuiz;
|
||||||
|
|
||||||
public function getIdUser(): int
|
public function getIdUser(): int
|
||||||
{
|
{
|
||||||
return $this->idUser;
|
return $this->idUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setIdUser(int $idUser): void
|
public function setIdUser(int $idUser): void
|
||||||
{
|
{
|
||||||
$this->idUser = $idUser;
|
$this->idUser = $idUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getIdQuiz(): int
|
public function getIdQuiz(): int
|
||||||
{
|
{
|
||||||
return $this->idQuiz;
|
return $this->idQuiz;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setIdQuiz(int $idQuiz): void
|
public function setIdQuiz(int $idQuiz): void
|
||||||
{
|
{
|
||||||
$this->idQuiz = $idQuiz;
|
$this->idQuiz = $idQuiz;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTime(): int
|
public function getTime(): int
|
||||||
{
|
{
|
||||||
return $this->time;
|
return $this->time;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setTime(int $time): void
|
public function setTime(int $time): void
|
||||||
{
|
{
|
||||||
$this->time = $time;
|
$this->time = $time;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getNbPts(): int
|
public function getNbPts(): int
|
||||||
{
|
{
|
||||||
return $this->nbPts;
|
return $this->nbPts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setNbPts(int $nbPts): void
|
public function setNbPts(int $nbPts): void
|
||||||
{
|
{
|
||||||
$this->nbPts = $nbPts;
|
$this->nbPts = $nbPts;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int $idUser;
|
private int $idUser;
|
||||||
|
|
||||||
private int $nbPts;
|
private int $nbPts;
|
||||||
|
|
||||||
private int $time;
|
private int $time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $idQuiz
|
* @param int $idQuiz
|
||||||
* @param int $idUser
|
* @param int $idUser
|
||||||
* @param int $time
|
* @param int $time
|
||||||
* @param int $nbPts
|
* @param int $nbPts
|
||||||
*/
|
*/
|
||||||
public function __construct(int $idQuiz, int $idUser, int $time, int $nbPts)
|
public function __construct(int $idQuiz, int $idUser, int $time, int $nbPts)
|
||||||
{
|
{
|
||||||
$this -> idQuiz = $idQuiz;
|
$this -> idQuiz = $idQuiz;
|
||||||
$this -> idUser = $idUser;
|
$this -> idUser = $idUser;
|
||||||
$this -> time = $time;
|
$this -> time = $time;
|
||||||
$this -> nbPts = $nbPts;
|
$this -> nbPts = $nbPts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,77 +1,77 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Entity;
|
namespace Entity;
|
||||||
|
|
||||||
class CharacterEntity
|
class CharacterEntity
|
||||||
{
|
{
|
||||||
|
|
||||||
private int $id_character;
|
private int $id_character;
|
||||||
|
|
||||||
private string $name;
|
private string $name;
|
||||||
|
|
||||||
private string $img_path;
|
private string $img_path;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id_character
|
* @param int $id_character
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param string $img_path
|
* @param string $img_path
|
||||||
*/
|
*/
|
||||||
public function __construct(int $id_character, string $name, string $img_path)
|
public function __construct(int $id_character, string $name, string $img_path)
|
||||||
{
|
{
|
||||||
$this->id_character = $id_character;
|
$this->id_character = $id_character;
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
$this->img_path = $img_path;
|
$this->img_path = $img_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getIdCharacter(): int
|
public function getIdCharacter(): int
|
||||||
{
|
{
|
||||||
return $this->id_character;
|
return $this->id_character;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id_character
|
* @param int $id_character
|
||||||
*/
|
*/
|
||||||
public function setIdCharacter(int $id_character): void
|
public function setIdCharacter(int $id_character): void
|
||||||
{
|
{
|
||||||
$this->id_character = $id_character;
|
$this->id_character = $id_character;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getName(): string
|
public function getName(): string
|
||||||
{
|
{
|
||||||
return $this->name;
|
return $this->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
*/
|
*/
|
||||||
public function setName(string $name): void
|
public function setName(string $name): void
|
||||||
{
|
{
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getImgPath(): string
|
public function getImgPath(): string
|
||||||
{
|
{
|
||||||
return $this->img_path;
|
return $this->img_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $img_path
|
* @param string $img_path
|
||||||
*/
|
*/
|
||||||
public function setImgPath(string $img_path): void
|
public function setImgPath(string $img_path): void
|
||||||
{
|
{
|
||||||
$this->img_path = $img_path;
|
$this->img_path = $img_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,148 +1,148 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Entity;
|
namespace Entity;
|
||||||
|
|
||||||
class QuestionEntity
|
class QuestionEntity
|
||||||
{
|
{
|
||||||
private int $id_question;
|
private int $id_question;
|
||||||
private string $question;
|
private string $question;
|
||||||
private string $answerA;
|
private string $answerA;
|
||||||
private string $answerB;
|
private string $answerB;
|
||||||
private string $answerC;
|
private string $answerC;
|
||||||
private string $answerD;
|
private string $answerD;
|
||||||
private string $cAnswer;
|
private string $cAnswer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id_question
|
* @param int $id_question
|
||||||
* @param string $question
|
* @param string $question
|
||||||
* @param string $answerA
|
* @param string $answerA
|
||||||
* @param string $answerB
|
* @param string $answerB
|
||||||
* @param string $answerC
|
* @param string $answerC
|
||||||
* @param string $answerD
|
* @param string $answerD
|
||||||
* @param string $cAnswer
|
* @param string $cAnswer
|
||||||
*/
|
*/
|
||||||
public function __construct(int $id_question, string $question, string $answerA, string $answerB, string $answerC, string $answerD, string $cAnswer)
|
public function __construct(int $id_question, string $question, string $answerA, string $answerB, string $answerC, string $answerD, string $cAnswer)
|
||||||
{
|
{
|
||||||
$this->id_question = $id_question;
|
$this->id_question = $id_question;
|
||||||
$this->question = $question;
|
$this->question = $question;
|
||||||
$this->answerA = $answerA;
|
$this->answerA = $answerA;
|
||||||
$this->answerB = $answerB;
|
$this->answerB = $answerB;
|
||||||
$this->answerC = $answerC;
|
$this->answerC = $answerC;
|
||||||
$this->answerD = $answerD;
|
$this->answerD = $answerD;
|
||||||
$this->cAnswer = $cAnswer;
|
$this->cAnswer = $cAnswer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getIdQuestion(): int
|
public function getIdQuestion(): int
|
||||||
{
|
{
|
||||||
return $this->id_question;
|
return $this->id_question;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id_question
|
* @param int $id_question
|
||||||
*/
|
*/
|
||||||
public function setIdQuestion(int $id_question): void
|
public function setIdQuestion(int $id_question): void
|
||||||
{
|
{
|
||||||
$this->id_question = $id_question;
|
$this->id_question = $id_question;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getQuestion(): string
|
public function getQuestion(): string
|
||||||
{
|
{
|
||||||
return $this->question;
|
return $this->question;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $question
|
* @param string $question
|
||||||
*/
|
*/
|
||||||
public function setQuestion(string $question): void
|
public function setQuestion(string $question): void
|
||||||
{
|
{
|
||||||
$this->question = $question;
|
$this->question = $question;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getAnswerA(): string
|
public function getAnswerA(): string
|
||||||
{
|
{
|
||||||
return $this->answerA;
|
return $this->answerA;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $answerA
|
* @param string $answerA
|
||||||
*/
|
*/
|
||||||
public function setAnswerA(string $answerA): void
|
public function setAnswerA(string $answerA): void
|
||||||
{
|
{
|
||||||
$this->answerA = $answerA;
|
$this->answerA = $answerA;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getAnswerB(): string
|
public function getAnswerB(): string
|
||||||
{
|
{
|
||||||
return $this->answerB;
|
return $this->answerB;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $answerB
|
* @param string $answerB
|
||||||
*/
|
*/
|
||||||
public function setAnswerB(string $answerB): void
|
public function setAnswerB(string $answerB): void
|
||||||
{
|
{
|
||||||
$this->answerB = $answerB;
|
$this->answerB = $answerB;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getAnswerC(): string
|
public function getAnswerC(): string
|
||||||
{
|
{
|
||||||
return $this->answerC;
|
return $this->answerC;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $answerC
|
* @param string $answerC
|
||||||
*/
|
*/
|
||||||
public function setAnswerC(string $answerC): void
|
public function setAnswerC(string $answerC): void
|
||||||
{
|
{
|
||||||
$this->answerC = $answerC;
|
$this->answerC = $answerC;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getAnswerD(): string
|
public function getAnswerD(): string
|
||||||
{
|
{
|
||||||
return $this->answerD;
|
return $this->answerD;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $answerD
|
* @param string $answerD
|
||||||
*/
|
*/
|
||||||
public function setAnswerD(string $answerD): void
|
public function setAnswerD(string $answerD): void
|
||||||
{
|
{
|
||||||
$this->answerD = $answerD;
|
$this->answerD = $answerD;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getCAnswer(): string
|
public function getCAnswer(): string
|
||||||
{
|
{
|
||||||
return $this->cAnswer;
|
return $this->cAnswer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $cAnswer
|
* @param string $cAnswer
|
||||||
*/
|
*/
|
||||||
public function setCAnswer(string $cAnswer): void
|
public function setCAnswer(string $cAnswer): void
|
||||||
{
|
{
|
||||||
$this->cAnswer = $cAnswer;
|
$this->cAnswer = $cAnswer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,56 +1,56 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Entity;
|
namespace Entity;
|
||||||
|
|
||||||
class QuizEntity
|
class QuizEntity
|
||||||
{
|
{
|
||||||
|
|
||||||
private int $id_quiz;
|
private int $id_quiz;
|
||||||
|
|
||||||
private int $nb_questions;
|
private int $nb_questions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id_quiz
|
* @param int $id_quiz
|
||||||
* @param int $nb_questions
|
* @param int $nb_questions
|
||||||
*/
|
*/
|
||||||
public function __construct(int $id_quiz, int $nb_questions)
|
public function __construct(int $id_quiz, int $nb_questions)
|
||||||
{
|
{
|
||||||
$this->id_quiz = $id_quiz;
|
$this->id_quiz = $id_quiz;
|
||||||
$this->nb_questions = $nb_questions;
|
$this->nb_questions = $nb_questions;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getIdQuiz(): int
|
public function getIdQuiz(): int
|
||||||
{
|
{
|
||||||
return $this->id_quiz;
|
return $this->id_quiz;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id_quiz
|
* @param int $id_quiz
|
||||||
*/
|
*/
|
||||||
public function setIdQuiz(int $id_quiz): void
|
public function setIdQuiz(int $id_quiz): void
|
||||||
{
|
{
|
||||||
$this->id_quiz = $id_quiz;
|
$this->id_quiz = $id_quiz;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getNbQuestions(): int
|
public function getNbQuestions(): int
|
||||||
{
|
{
|
||||||
return $this->nb_questions;
|
return $this->nb_questions;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $nb_questions
|
* @param int $nb_questions
|
||||||
*/
|
*/
|
||||||
public function setNbQuestions(int $nb_questions): void
|
public function setNbQuestions(int $nb_questions): void
|
||||||
{
|
{
|
||||||
$this->nb_questions = $nb_questions;
|
$this->nb_questions = $nb_questions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,77 +1,77 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Entity;
|
namespace Entity;
|
||||||
|
|
||||||
class SourceEntity
|
class SourceEntity
|
||||||
{
|
{
|
||||||
private int $id_source;
|
private int $id_source;
|
||||||
|
|
||||||
private string $title;
|
private string $title;
|
||||||
|
|
||||||
private string $date;
|
private string $date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id_source
|
* @param int $id_source
|
||||||
* @param string $title
|
* @param string $title
|
||||||
* @param string $date
|
* @param string $date
|
||||||
*/
|
*/
|
||||||
public function __construct(int $id_source, string $title, string $date)
|
public function __construct(int $id_source, string $title, string $date)
|
||||||
{
|
{
|
||||||
$this->id_source = $id_source;
|
$this->id_source = $id_source;
|
||||||
$this->title = $title;
|
$this->title = $title;
|
||||||
$this->date = $date;
|
$this->date = $date;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getIdSource(): int
|
public function getIdSource(): int
|
||||||
{
|
{
|
||||||
return $this->id_source;
|
return $this->id_source;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id_source
|
* @param int $id_source
|
||||||
*/
|
*/
|
||||||
public function setIdSource(int $id_source): void
|
public function setIdSource(int $id_source): void
|
||||||
{
|
{
|
||||||
$this->id_source = $id_source;
|
$this->id_source = $id_source;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getTitle(): string
|
public function getTitle(): string
|
||||||
{
|
{
|
||||||
return $this->title;
|
return $this->title;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $title
|
* @param string $title
|
||||||
*/
|
*/
|
||||||
public function setTitle(string $title): void
|
public function setTitle(string $title): void
|
||||||
{
|
{
|
||||||
$this->title = $title;
|
$this->title = $title;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getDate(): string
|
public function getDate(): string
|
||||||
{
|
{
|
||||||
return $this->date;
|
return $this->date;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $date
|
* @param string $date
|
||||||
*/
|
*/
|
||||||
public function setDate(string $date): void
|
public function setDate(string $date): void
|
||||||
{
|
{
|
||||||
$this->date = $date;
|
$this->date = $date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,175 +1,158 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Entity;
|
namespace Entity;
|
||||||
|
|
||||||
class User{
|
class UserEntity {
|
||||||
|
|
||||||
private int $id;
|
private int $id;
|
||||||
private string $username;
|
private string $pseudo;
|
||||||
private string $passwd;
|
private string $password;
|
||||||
private string $hidenPasswd;
|
private string $email;
|
||||||
private int $img;
|
private string $date;
|
||||||
private string $email;
|
private bool $isAdmin;
|
||||||
|
private int $imgPrfl;
|
||||||
/**
|
|
||||||
* @param int $id
|
public function getId(): int
|
||||||
* @param string $username
|
{
|
||||||
* @param string $passwd
|
return $this->id;
|
||||||
* @param string $hidenPasswd
|
}
|
||||||
* @param int $img
|
|
||||||
* @param string $email
|
public function setId(int $id): void
|
||||||
*/
|
{
|
||||||
public function __construct(int $id, string $username, string $passwd, int $img, string $email)
|
$this->id = $id;
|
||||||
{
|
}
|
||||||
$this->id = $id;
|
|
||||||
$this->username = $username;
|
public function getPseudo(): string
|
||||||
$this->passwd = $passwd;
|
{
|
||||||
$this->hidenPasswd = hidenPasswd($passwd);
|
return $this->pseudo;
|
||||||
$this->img = $img;
|
}
|
||||||
$this->email = $email;
|
|
||||||
}
|
public function setPseudo(string $pseudo): void
|
||||||
|
{
|
||||||
/**
|
$this->pseudo = $pseudo;
|
||||||
* @return string
|
}
|
||||||
*/
|
|
||||||
public function getId(): int
|
public function getPassword(): string
|
||||||
{
|
{
|
||||||
return $this->id;
|
return $this->password;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function setPassword(string $password): void
|
||||||
* @param string $id
|
{
|
||||||
*/
|
$this->password = $password;
|
||||||
public function setId(int $id): void
|
}
|
||||||
{
|
|
||||||
$this->id = $id;
|
public function getEmail(): string
|
||||||
}
|
{
|
||||||
|
return $this->email;
|
||||||
/**
|
}
|
||||||
* @return string
|
|
||||||
*/
|
public function setEmail(string $email): void
|
||||||
public function getUsername(): string
|
{
|
||||||
{
|
$this->email = $email;
|
||||||
return $this->username;
|
}
|
||||||
}
|
|
||||||
|
public function getDate(): string
|
||||||
/**
|
{
|
||||||
* @param string $username
|
return $this->date;
|
||||||
*/
|
}
|
||||||
public function setUsername(string $username): void
|
|
||||||
{
|
public function setDate(string $date): void
|
||||||
$this->username = $username;
|
{
|
||||||
}
|
$this->date = $date;
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @return string
|
public function isAdmin(): bool
|
||||||
*/
|
{
|
||||||
public function getImg(): int
|
return $this->isAdmin;
|
||||||
{
|
}
|
||||||
return $this->img;
|
|
||||||
}
|
public function setIsAdmin(bool $isAdmin): void
|
||||||
|
{
|
||||||
/**
|
$this->isAdmin = $isAdmin;
|
||||||
* @param string $img
|
}
|
||||||
*/
|
|
||||||
public function setImg(int $img): void
|
public function getImgPrfl(): int
|
||||||
{
|
{
|
||||||
$this->img = $img;
|
return $this->imgPrfl;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function setImgPrfl(int $imgPrfl): void
|
||||||
* @return string
|
{
|
||||||
*/
|
$this->imgPrfl = $imgPrfl;
|
||||||
public function getEmail(): string
|
}
|
||||||
{
|
|
||||||
return $this->email;
|
/**
|
||||||
}
|
* @param int $id
|
||||||
|
* @param string $pseudo
|
||||||
/**
|
* @param string $password
|
||||||
* @param string $email
|
* @param string $email
|
||||||
*/
|
* @param int $imgPrfl
|
||||||
public function setEmail(string $email): void
|
* @param bool $isAdmin
|
||||||
{
|
* @param string $date
|
||||||
$this->email = $email;
|
*/
|
||||||
}
|
public function __construct(int $id, string $pseudo, string $password, string $email, int $imgPrfl, bool $isAdmin, string $date)
|
||||||
|
{
|
||||||
/**
|
$this->id = $id;
|
||||||
* @return string
|
$this->pseudo = $pseudo;
|
||||||
*/
|
$this->password = $password;
|
||||||
public function getPasswd(): string
|
$this->email = $email;
|
||||||
{
|
$this->imgPrfl = $imgPrfl;
|
||||||
return $this->passwd;
|
$this->isAdmin = $isAdmin;
|
||||||
}
|
$this->date = $date;
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
}
|
||||||
public function getHidenPasswd(): string
|
// ============================================ En attente du Model ============================================
|
||||||
{
|
/*$dsn = "pgsql:host=londres;dbname=dblebeaulato";
|
||||||
return $this->hidenPasswd;
|
$username = "lebeaulato";
|
||||||
}
|
$password = "";
|
||||||
|
|
||||||
/**
|
$con = new Connection($dsn,$username,$password);
|
||||||
* @param string $passwd
|
|
||||||
*/
|
$query = 'SELECT * FROM Users WHERE id_user=:idUser';
|
||||||
public function setPasswd(string $passwd): void
|
$con->executeQuery($query, array(':idUser'=>array('U003', PDO::PARAM_STR)));
|
||||||
{
|
$result = $con->getResults();
|
||||||
$this->passwd = $passwd;
|
|
||||||
$this->hidenPassWd = hidenPassWd($passwd);
|
$u = new User($result[0]['id_user'],$result[0]['username'], $result[0]['pssword'], '../images/imageProfil.png', $result[0]['email']);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
//UPDATE username User
|
||||||
// ============================================ En attente du Model ============================================
|
$query = 'UPDATE Users SET username=:newUsername WHERE id_user=:idUser';
|
||||||
/*$dsn = "pgsql:host=londres;dbname=dblebeaulato";
|
$con->executeQuery($query, array(':idUser'=>array('U003', PDO::PARAM_STR), ':newUsername'=> array('Hello', PDO::PARAM_STR)));
|
||||||
$username = "lebeaulato";
|
$queryReponse = 'SELECT username FROM Users WHERE id_user=:idUser';
|
||||||
$password = "";
|
|
||||||
|
$con->executeQuery($queryReponse, array(':idUser'=>array('U003', PDO::PARAM_STR)));
|
||||||
$con = new Connection($dsn,$username,$password);
|
$result = $con->getResults();
|
||||||
|
$u->setUsername($result[0]['username']);
|
||||||
$query = 'SELECT * FROM Users WHERE id_user=:idUser';
|
|
||||||
$con->executeQuery($query, array(':idUser'=>array('U003', PDO::PARAM_STR)));
|
|
||||||
$result = $con->getResults();
|
//UPDATE email User
|
||||||
|
$query = 'UPDATE Users SET email=:newEmail WHERE id_user=:idUser';
|
||||||
$u = new User($result[0]['id_user'],$result[0]['username'], $result[0]['pssword'], '../images/imageProfil.png', $result[0]['email']);
|
$con->executeQuery($query, array(':idUser'=>array('U003', PDO::PARAM_STR), ':newEmail'=> array('hello@gmail.com', PDO::PARAM_STR)));
|
||||||
|
$queryReponse = 'SELECT email FROM Users WHERE id_user=:idUser';
|
||||||
|
|
||||||
|
$con->executeQuery($queryReponse, array(':idUser'=>array('U003', PDO::PARAM_STR)));
|
||||||
|
$result = $con->getResults();
|
||||||
//UPDATE username User
|
$u->setEmail($result[0]['email']);
|
||||||
$query = 'UPDATE Users SET username=:newUsername WHERE id_user=:idUser';
|
|
||||||
$con->executeQuery($query, array(':idUser'=>array('U003', PDO::PARAM_STR), ':newUsername'=> array('Hello', PDO::PARAM_STR)));
|
//UPDATE passwd User
|
||||||
$queryReponse = 'SELECT username FROM Users WHERE id_user=:idUser';
|
$query = 'UPDATE Users SET pssword=:newPassWd WHERE id_user=:idUser';
|
||||||
|
$con->executeQuery($query, array(':idUser'=>array('U003', PDO::PARAM_STR), ':newPassWd'=> array('TestMotDePasssse', PDO::PARAM_STR)));
|
||||||
$con->executeQuery($queryReponse, array(':idUser'=>array('U003', PDO::PARAM_STR)));
|
|
||||||
$result = $con->getResults();
|
$queryReponse = 'SELECT pssword FROM Users WHERE id_user=:idUser';
|
||||||
$u->setUsername($result[0]['username']);
|
$con->executeQuery($queryReponse, array(':idUser'=>array('U003', PDO::PARAM_STR)));
|
||||||
|
$result = $con->getResults();
|
||||||
|
$u->setPasswd($result[0]['pssword']); /*Test*/
|
||||||
//UPDATE email User
|
|
||||||
$query = 'UPDATE Users SET email=:newEmail WHERE id_user=:idUser';
|
// ================================================================================================================
|
||||||
$con->executeQuery($query, array(':idUser'=>array('U003', PDO::PARAM_STR), ':newEmail'=> array('hello@gmail.com', PDO::PARAM_STR)));
|
|
||||||
$queryReponse = 'SELECT email FROM Users WHERE id_user=:idUser';
|
|
||||||
|
|
||||||
$con->executeQuery($queryReponse, array(':idUser'=>array('U003', PDO::PARAM_STR)));
|
function hidenPassWd(string $passwd){
|
||||||
$result = $con->getResults();
|
if(strlen($passwd) >= 16) return str_repeat('*', 16);
|
||||||
$u->setEmail($result[0]['email']);
|
return str_repeat('*', strlen($passwd));
|
||||||
|
}
|
||||||
//UPDATE passwd User
|
?>
|
||||||
$query = 'UPDATE Users SET pssword=:newPassWd WHERE id_user=:idUser';
|
|
||||||
$con->executeQuery($query, array(':idUser'=>array('U003', PDO::PARAM_STR), ':newPassWd'=> array('TestMotDePasssse', PDO::PARAM_STR)));
|
|
||||||
|
|
||||||
$queryReponse = 'SELECT pssword FROM Users WHERE id_user=:idUser';
|
|
||||||
$con->executeQuery($queryReponse, array(':idUser'=>array('U003', PDO::PARAM_STR)));
|
|
||||||
$result = $con->getResults();
|
|
||||||
$u->setPasswd($result[0]['pssword']); /*Test*/
|
|
||||||
|
|
||||||
// ================================================================================================================
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function hidenPassWd(string $passwd){
|
|
||||||
if(strlen($passwd) >= 16) return str_repeat('*', 16);
|
|
||||||
return str_repeat('*', strlen($passwd));
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
@ -1,75 +1,75 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Gateway;
|
namespace Gateway;
|
||||||
use Connection;
|
use Connection;
|
||||||
use PDO;
|
use PDO;
|
||||||
|
|
||||||
|
|
||||||
class CharacterGateway
|
class CharacterGateway
|
||||||
{
|
{
|
||||||
|
|
||||||
private Connection $co;
|
private Connection $co;
|
||||||
|
|
||||||
public function __construct(Connection $co)
|
public function __construct(Connection $co)
|
||||||
{
|
{
|
||||||
$this -> co = $co;
|
$this -> co = $co;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function create(int $id_character, string $name , string $img_char) : bool
|
public function create(int $id_character, string $name , string $img_char) : bool
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
INSERT INTO Characters
|
INSERT INTO Characters
|
||||||
VALUES(:id_char, :name, :img_char)
|
VALUES(:id_char, :name, :img_char)
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, [
|
return $this -> co -> executeQuery($query, [
|
||||||
'id_char' => array($id_character, PDO::PARAM_INT),
|
'id_char' => array($id_character, PDO::PARAM_INT),
|
||||||
'name' => array($name, PDO::PARAM_STR),
|
'name' => array($name, PDO::PARAM_STR),
|
||||||
'img_char' => array($img_char, PDO::PARAM_STR)
|
'img_char' => array($img_char, PDO::PARAM_STR)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findById(int $id) : array
|
public function findById(int $id) : array
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM Characters WHERE id_char = :id_c";
|
$query = "SELECT * FROM Characters WHERE id_char = :id_c";
|
||||||
$this -> co -> executeQuery($query, ["id_c" => array($id, PDO::PARAM_INT)]);
|
$this -> co -> executeQuery($query, ["id_c" => array($id, PDO::PARAM_INT)]);
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findByName(string $name) : array
|
public function findByName(string $name) : array
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM Characters WHERE name = :n";
|
$query = "SELECT * FROM Characters WHERE name = :n";
|
||||||
$this -> co -> executeQuery($query, ["n" => array($name, PDO::PARAM_STR)]);
|
$this -> co -> executeQuery($query, ["n" => array($name, PDO::PARAM_STR)]);
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findAll() : array
|
public function findAll() : array
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM Characters";
|
$query = "SELECT * FROM Characters";
|
||||||
$this -> co -> executeQuery($query);
|
$this -> co -> executeQuery($query);
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delete(int $id) : bool
|
public function delete(int $id) : bool
|
||||||
{
|
{
|
||||||
$query = "DELETE FROM Characters WHERE id_char = :id_c";
|
$query = "DELETE FROM Characters WHERE id_char = :id_c";
|
||||||
return $this -> co -> executeQuery($query, ["id_c" => array($id, PDO::PARAM_INT)]);
|
return $this -> co -> executeQuery($query, ["id_c" => array($id, PDO::PARAM_INT)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update(int $id_char, string $name, string $img_char) : bool
|
public function update(int $id_char, string $name, string $img_char) : bool
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
UPDATE Characters
|
UPDATE Characters
|
||||||
SET name = :n, img_char = :i
|
SET name = :n, img_char = :i
|
||||||
WHERE id_char = :id_c
|
WHERE id_char = :id_c
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, [
|
return $this -> co -> executeQuery($query, [
|
||||||
"id_c" => array($id_char, PDO::PARAM_INT),
|
"id_c" => array($id_char, PDO::PARAM_INT),
|
||||||
"name" => array($name, PDO::PARAM_STR),
|
"name" => array($name, PDO::PARAM_STR),
|
||||||
"i" => array($img_char, PDO::PARAM_STR)
|
"i" => array($img_char, PDO::PARAM_STR)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,35 +1,35 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Gateway;
|
namespace Gateway;
|
||||||
|
|
||||||
use PDO;
|
use PDO;
|
||||||
|
|
||||||
class Connection extends \PDO {
|
class Connection extends \PDO {
|
||||||
|
|
||||||
private $stmt;
|
private $stmt;
|
||||||
|
|
||||||
public function __construct(string $dsn, string $username, string $password) {
|
public function __construct(string $dsn, string $username, string $password) {
|
||||||
parent::__construct($dsn,$username,$password);
|
parent::__construct($dsn,$username,$password);
|
||||||
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** * @param string $query
|
/** * @param string $query
|
||||||
* @param array $parameters *
|
* @param array $parameters *
|
||||||
* @return bool Returns `true` on success, `false` otherwise
|
* @return bool Returns `true` on success, `false` otherwise
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function executeQuery(string $query, array $parameters = []) : bool{
|
public function executeQuery(string $query, array $parameters = []) : bool{
|
||||||
$this->stmt = parent::prepare($query);
|
$this->stmt = parent::prepare($query);
|
||||||
foreach ($parameters as $name => $value) {
|
foreach ($parameters as $name => $value) {
|
||||||
$this->stmt->bindValue($name, $value[0], $value[1]);
|
$this->stmt->bindValue($name, $value[0], $value[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->stmt->execute();
|
return $this->stmt->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResults() : array {
|
public function getResults() : array {
|
||||||
return $this->stmt->fetchall();
|
return $this->stmt->fetchall();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,77 +1,77 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Gateway;
|
namespace Gateway;
|
||||||
use PDO;
|
use PDO;
|
||||||
|
|
||||||
class FavoriteGateway
|
class FavoriteGateway
|
||||||
{
|
{
|
||||||
private Connection $co;
|
private Connection $co;
|
||||||
|
|
||||||
public function __construct(Connection $co)
|
public function __construct(Connection $co)
|
||||||
{
|
{
|
||||||
$this -> co = $co;
|
$this -> co = $co;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createFavoriteGateway(int $idUser, int $idQuote) : bool
|
public function createFavoriteGateway(int $idUser, int $idQuote) : bool
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
INSERT INTO Favorite
|
INSERT INTO Favorite
|
||||||
VALUES (:user, :quote)
|
VALUES (:user, :quote)
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, [
|
return $this -> co -> executeQuery($query, [
|
||||||
'user' => array($idUser, PDO::PARAM_INT),
|
'user' => array($idUser, PDO::PARAM_INT),
|
||||||
'quote' => array($idQuote, PDO::PARAM_INT)
|
'quote' => array($idQuote, PDO::PARAM_INT)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findFavoriteById(int $idUser, int $idQuote) : array
|
public function findFavoriteById(int $idUser, int $idQuote) : array
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
SELECT * FROM Favorite
|
SELECT * FROM Favorite
|
||||||
WHERE user_f = :user AND quote_f = :quote
|
WHERE user_f = :user AND quote_f = :quote
|
||||||
";
|
";
|
||||||
|
|
||||||
$this -> co -> executeQuery($query, [
|
$this -> co -> executeQuery($query, [
|
||||||
'user' => array($idUser, PDO::PARAM_INT),
|
'user' => array($idUser, PDO::PARAM_INT),
|
||||||
'quote' => array($idQuote, PDO::PARAM_INT)
|
'quote' => array($idQuote, PDO::PARAM_INT)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findFavoriteByUser(int $idUser) : array
|
public function findFavoriteByUser(int $idUser) : array
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
SELECT * FROM Favorite
|
SELECT * FROM Favorite
|
||||||
WHERE user_f = :user
|
WHERE user_f = :user
|
||||||
";
|
";
|
||||||
|
|
||||||
$this -> co -> executeQuery($query, ['user' => array($idUser, PDO::PARAM_INT)]);
|
$this -> co -> executeQuery($query, ['user' => array($idUser, PDO::PARAM_INT)]);
|
||||||
|
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findAllFavorite() : array
|
public function findAllFavorite() : array
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM Favorite";
|
$query = "SELECT * FROM Favorite";
|
||||||
|
|
||||||
$this -> co -> executeQuery($query);
|
$this -> co -> executeQuery($query);
|
||||||
|
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteFavoriteGateway(int $idUser, int $idQuote) : bool
|
public function deleteFavoriteGateway(int $idUser, int $idQuote) : bool
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
DELETE FROM Favorite
|
DELETE FROM Favorite
|
||||||
WHERE user_f = :user AND quote_f = :quote
|
WHERE user_f = :user AND quote_f = :quote
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, [
|
return $this -> co -> executeQuery($query, [
|
||||||
'user' => array($idUser, PDO::PARAM_INT),
|
'user' => array($idUser, PDO::PARAM_INT),
|
||||||
'quote' => array($idQuote, PDO::PARAM_INT)
|
'quote' => array($idQuote, PDO::PARAM_INT)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,87 +1,87 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Gateway;
|
namespace Gateway;
|
||||||
use PDO;
|
use PDO;
|
||||||
|
|
||||||
class ImageGateway
|
class ImageGateway
|
||||||
{
|
{
|
||||||
private Connection $co;
|
private Connection $co;
|
||||||
|
|
||||||
public function __construct(Connection $co)
|
public function __construct(Connection $co)
|
||||||
{
|
{
|
||||||
$this -> co = $co;
|
$this -> co = $co;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createImgGateway(int $idImg, string $imgPath, bool $isImgProfile) : bool
|
public function createImgGateway(int $idImg, string $imgPath, bool $isImgProfile) : bool
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
INSERT INTO Images
|
INSERT INTO Images
|
||||||
VALUES (:id_img, :img_path, :is_img_profile)
|
VALUES (:id_img, :img_path, :is_img_profile)
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, [
|
return $this -> co -> executeQuery($query, [
|
||||||
'id_img' => array($idImg, PDO::PARAM_INT),
|
'id_img' => array($idImg, PDO::PARAM_INT),
|
||||||
'img_path' => array($imgPath, PDO::PARAM_STR),
|
'img_path' => array($imgPath, PDO::PARAM_STR),
|
||||||
'is_img_profile' => array($isImgProfile, PDO::PARAM_BOOL),
|
'is_img_profile' => array($isImgProfile, PDO::PARAM_BOOL),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findImgById(int $idImg) : array
|
public function findImgById(int $idImg) : array
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
SELECT * FROM Images
|
SELECT * FROM Images
|
||||||
WHERE id_image = :id_img
|
WHERE id_image = :id_img
|
||||||
";
|
";
|
||||||
|
|
||||||
$this -> co -> executeQuery($query, ['id_img' => array($idImg, PDO::PARAM_INT)]);
|
$this -> co -> executeQuery($query, ['id_img' => array($idImg, PDO::PARAM_INT)]);
|
||||||
|
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findAllImg() : array
|
public function findAllImg() : array
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
SELECT * FROM Images
|
SELECT * FROM Images
|
||||||
";
|
";
|
||||||
|
|
||||||
$this -> co -> executeQuery($query);
|
$this -> co -> executeQuery($query);
|
||||||
|
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findAllImgProfile() : array
|
public function findAllImgProfile() : array
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
SELECT * FROM Images
|
SELECT * FROM Images
|
||||||
WHERE is_img_prfl
|
WHERE is_img_prfl
|
||||||
";
|
";
|
||||||
|
|
||||||
$this -> co -> executeQuery($query);
|
$this -> co -> executeQuery($query);
|
||||||
|
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteImgGateway(int $idImg) : bool
|
public function deleteImgGateway(int $idImg) : bool
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
DELETE FROM Images
|
DELETE FROM Images
|
||||||
WHERE id_image = :id_img
|
WHERE id_image = :id_img
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, ['id_img' => array($idImg, PDO::PARAM_INT)]);
|
return $this -> co -> executeQuery($query, ['id_img' => array($idImg, PDO::PARAM_INT)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateImgGateway(int $idImg, string $imgPath) : bool
|
public function updateImgGateway(int $idImg, string $imgPath) : bool
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
UPDATE Images
|
UPDATE Images
|
||||||
SET img_path = :img_path
|
SET img_path = :img_path
|
||||||
WHERE id_image = :id_img
|
WHERE id_image = :id_img
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, [
|
return $this -> co -> executeQuery($query, [
|
||||||
'id_img' => array($idImg, PDO::PARAM_INT),
|
'id_img' => array($idImg, PDO::PARAM_INT),
|
||||||
'img_path' => array($imgPath, PDO::PARAM_STR)
|
'img_path' => array($imgPath, PDO::PARAM_STR)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,107 +1,107 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Gateway;
|
namespace Gateway;
|
||||||
use Gateway\Connection;
|
use Gateway\Connection;
|
||||||
use PDO;
|
use PDO;
|
||||||
|
|
||||||
class QuestionGateway
|
class QuestionGateway
|
||||||
{
|
{
|
||||||
private Connection $co;
|
private Connection $co;
|
||||||
|
|
||||||
public function __construct(Connection $co)
|
public function __construct(Connection $co)
|
||||||
{
|
{
|
||||||
$this -> co = $co;
|
$this -> co = $co;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function create(int $id_question, string $question, string $answerA, string $answerB, string $answerC, string $answerD, string $cAnswer): bool
|
public function create(int $id_question, string $question, string $answerA, string $answerB, string $answerC, string $answerD, string $cAnswer): bool
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
INSERT INTO Question
|
INSERT INTO Question
|
||||||
VALUES (:id_q, :question, :answerA, :answerB, :answerC, :answerD, :cAnswer)
|
VALUES (:id_q, :question, :answerA, :answerB, :answerC, :answerD, :cAnswer)
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, [
|
return $this -> co -> executeQuery($query, [
|
||||||
array('id_q' => $id_question, PDO::PARAM_INT),
|
array('id_q' => $id_question, PDO::PARAM_INT),
|
||||||
array('question' => $question, PDO::PARAM_STR),
|
array('question' => $question, PDO::PARAM_STR),
|
||||||
array('answerA' => $answerA, PDO::PARAM_STR),
|
array('answerA' => $answerA, PDO::PARAM_STR),
|
||||||
array('answerB' => $answerB, PDO::PARAM_STR),
|
array('answerB' => $answerB, PDO::PARAM_STR),
|
||||||
array('answerC' => $answerC, PDO::PARAM_STR),
|
array('answerC' => $answerC, PDO::PARAM_STR),
|
||||||
array('answerD' => $answerD, PDO::PARAM_STR),
|
array('answerD' => $answerD, PDO::PARAM_STR),
|
||||||
array('cAnswer' => $cAnswer, PDO::PARAM_STR),
|
array('cAnswer' => $cAnswer, PDO::PARAM_STR),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function findById(int $id) : array
|
public function findById(int $id) : array
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM Question WHERE id_question = :id_q";
|
$query = "SELECT * FROM Question WHERE id_question = :id_q";
|
||||||
$this -> co -> executeQuery($query, ['id_q' => array($id, PDO::PARAM_INT)]);
|
$this -> co -> executeQuery($query, ['id_q' => array($id, PDO::PARAM_INT)]);
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function updateText(int $id_q, string $newQuestion) : bool
|
public function updateText(int $id_q, string $newQuestion) : bool
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
UPDATE Question
|
UPDATE Question
|
||||||
SET question = :question
|
SET question = :question
|
||||||
WHERE id_question = :id_q
|
WHERE id_question = :id_q
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, [
|
return $this -> co -> executeQuery($query, [
|
||||||
'id_q' => array($id_q, PDO::PARAM_INT),
|
'id_q' => array($id_q, PDO::PARAM_INT),
|
||||||
'question' => array($newQuestion, PDO::PARAM_STR)
|
'question' => array($newQuestion, PDO::PARAM_STR)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateAnswers(int $id_q, string $newA, string $newB, string $newC, string $newD, string $newCorrect): bool
|
public function updateAnswers(int $id_q, string $newA, string $newB, string $newC, string $newD, string $newCorrect): bool
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
UPDATE Question
|
UPDATE Question
|
||||||
SET answerA = :answerA, answerB = :answerB,
|
SET answerA = :answerA, answerB = :answerB,
|
||||||
answerC = :answerC, answerD = :answerD, cAnswer = :cAnswer
|
answerC = :answerC, answerD = :answerD, cAnswer = :cAnswer
|
||||||
WHERE id_question = :id_q
|
WHERE id_question = :id_q
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, [
|
return $this -> co -> executeQuery($query, [
|
||||||
'id_q' => array($id_q, PDO::PARAM_INT),
|
'id_q' => array($id_q, PDO::PARAM_INT),
|
||||||
'answerA' => array($newA, PDO::PARAM_STR),
|
'answerA' => array($newA, PDO::PARAM_STR),
|
||||||
'answerB' => array($newB, PDO::PARAM_STR),
|
'answerB' => array($newB, PDO::PARAM_STR),
|
||||||
'answerC' => array($newC, PDO::PARAM_STR),
|
'answerC' => array($newC, PDO::PARAM_STR),
|
||||||
'answerD' => array($newD, PDO::PARAM_STR),
|
'answerD' => array($newD, PDO::PARAM_STR),
|
||||||
'cAnswer' => array($newCorrect, PDO::PARAM_STR)
|
'cAnswer' => array($newCorrect, PDO::PARAM_STR)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes a question from the database by its ID
|
* Deletes a question from the database by its ID
|
||||||
*
|
*
|
||||||
* @param int $id The ID of the question
|
* @param int $id The ID of the question
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function delete(int $id) : bool
|
public function delete(int $id) : bool
|
||||||
{
|
{
|
||||||
$query = "DELETE FROM Question WHERE id_question = :id_q";
|
$query = "DELETE FROM Question WHERE id_question = :id_q";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, ['id_q' => array($id, PDO::PARAM_INT)]);
|
return $this -> co -> executeQuery($query, ['id_q' => array($id, PDO::PARAM_INT)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves all quizzes from the database
|
* Retrieves all quizzes from the database
|
||||||
*
|
*
|
||||||
* @return QuestionEntity[] An array of `Question` objects
|
* @return QuestionEntity[] An array of `Question` objects
|
||||||
*/
|
*/
|
||||||
public function findAll() : array
|
public function findAll() : array
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM Question";
|
$query = "SELECT * FROM Question";
|
||||||
$this -> co -> executeQuery($query);
|
$this -> co -> executeQuery($query);
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findRdmQuestion() : array
|
public function findRdmQuestion() : array
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM Question ORDER BY RANDOM() LIMIT 1";
|
$query = "SELECT * FROM Question ORDER BY RANDOM() LIMIT 1";
|
||||||
$this -> co -> executeQuery($query);
|
$this -> co -> executeQuery($query);
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,50 +1,50 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Gateway;
|
namespace Gateway;
|
||||||
use Gateway\Connection;
|
use Gateway\Connection;
|
||||||
use PDO;
|
use PDO;
|
||||||
|
|
||||||
|
|
||||||
class QuizGateway
|
class QuizGateway
|
||||||
{
|
{
|
||||||
private Connection $co;
|
private Connection $co;
|
||||||
|
|
||||||
public function __construct(Connection $co)
|
public function __construct(Connection $co)
|
||||||
{
|
{
|
||||||
$this -> co = $co;
|
$this -> co = $co;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function create(int $id_quiz, int $nb_questions) : bool
|
public function create(int $id_quiz, int $nb_questions) : bool
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
INSERT INTO Quiz
|
INSERT INTO Quiz
|
||||||
VALUES (:id_q, :nb_q)
|
VALUES (:id_q, :nb_q)
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, [
|
return $this -> co -> executeQuery($query, [
|
||||||
':id_q' => array($id_quiz, PDO::PARAM_INT),
|
':id_q' => array($id_quiz, PDO::PARAM_INT),
|
||||||
':nb_q' => array($nb_questions, PDO::PARAM_INT)
|
':nb_q' => array($nb_questions, PDO::PARAM_INT)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findQuizById(int $id) : array
|
public function findQuizById(int $id) : array
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM Quiz WHERE id_quiz = :id_q";
|
$query = "SELECT * FROM Quiz WHERE id_quiz = :id_q";
|
||||||
$this -> co -> executeQuery($query, [':id_q' => array($id, PDO::PARAM_INT)]);
|
$this -> co -> executeQuery($query, [':id_q' => array($id, PDO::PARAM_INT)]);
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delete(int $id) : bool
|
public function delete(int $id) : bool
|
||||||
{
|
{
|
||||||
$query = "DELETE FROM Quiz WHERE id_quiz = :id_q";
|
$query = "DELETE FROM Quiz WHERE id_quiz = :id_q";
|
||||||
return $this -> co -> executeQuery($query, [':id_q' => array($id, PDO::PARAM_INT)]);
|
return $this -> co -> executeQuery($query, [':id_q' => array($id, PDO::PARAM_INT)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findAll() : array
|
public function findAll() : array
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM Quiz";
|
$query = "SELECT * FROM Quiz";
|
||||||
$this -> co -> executeQuery($query);
|
$this -> co -> executeQuery($query);
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,73 +1,73 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Gateway;
|
namespace Gateway;
|
||||||
use PDO;
|
use PDO;
|
||||||
|
|
||||||
class QuizQuestionGateway
|
class QuizQuestionGateway
|
||||||
{
|
{
|
||||||
private Connection $co;
|
private Connection $co;
|
||||||
|
|
||||||
public function __construct(Connection $co)
|
public function __construct(Connection $co)
|
||||||
{
|
{
|
||||||
$this -> co = $co;
|
$this -> co = $co;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createQuizQuestionGateway(int $idQuiz, int $idQuestion): bool
|
public function createQuizQuestionGateway(int $idQuiz, int $idQuestion): bool
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
INSERT INTO QuizQuestions
|
INSERT INTO QuizQuestions
|
||||||
VALUES (:id_quiz, :id_question)
|
VALUES (:id_quiz, :id_question)
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, [
|
return $this -> co -> executeQuery($query, [
|
||||||
'id_quiz' => array($idQuiz, PDO::PARAM_INT),
|
'id_quiz' => array($idQuiz, PDO::PARAM_INT),
|
||||||
'id_question' => array($idQuestion, PDO::PARAM_INT)
|
'id_question' => array($idQuestion, PDO::PARAM_INT)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findQuizQuestionById(int $idQuiz, int $idQuestion) : array
|
public function findQuizQuestionById(int $idQuiz, int $idQuestion) : array
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
SELECT * FROM QuizQuestions
|
SELECT * FROM QuizQuestions
|
||||||
WHERE quiz_qq = :id_quiz AND question_qq = :id_question
|
WHERE quiz_qq = :id_quiz AND question_qq = :id_question
|
||||||
";
|
";
|
||||||
|
|
||||||
$this -> co -> executeQuery($query, [
|
$this -> co -> executeQuery($query, [
|
||||||
'id_quiz' => array($idQuiz, PDO::PARAM_INT),
|
'id_quiz' => array($idQuiz, PDO::PARAM_INT),
|
||||||
'id_question' => array($idQuestion, PDO::PARAM_INT)
|
'id_question' => array($idQuestion, PDO::PARAM_INT)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findQuestionsFromQuiz(int $idQuiz) : array
|
public function findQuestionsFromQuiz(int $idQuiz) : array
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
SELECT * FROM QuizQuestions
|
SELECT * FROM QuizQuestions
|
||||||
WHERE quiz_qq = :id_quiz
|
WHERE quiz_qq = :id_quiz
|
||||||
";
|
";
|
||||||
|
|
||||||
$this -> co -> executeQuery($query, ['id_quiz' => array($idQuiz, PDO::PARAM_INT)]);
|
$this -> co -> executeQuery($query, ['id_quiz' => array($idQuiz, PDO::PARAM_INT)]);
|
||||||
|
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteQuizQuestionGateway(int $idQuiz, int $idQuestion) : bool
|
public function deleteQuizQuestionGateway(int $idQuiz, int $idQuestion) : bool
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
DELETE FROM QuizQuestions
|
DELETE FROM QuizQuestions
|
||||||
WHERE quiz_qq = :id_quiz AND question_qq = :id_question
|
WHERE quiz_qq = :id_quiz AND question_qq = :id_question
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, [
|
return $this -> co -> executeQuery($query, [
|
||||||
'id_quiz' => array($idQuiz, PDO::PARAM_INT),
|
'id_quiz' => array($idQuiz, PDO::PARAM_INT),
|
||||||
'id_question' => array($idQuestion, PDO::PARAM_INT)
|
'id_question' => array($idQuestion, PDO::PARAM_INT)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
# To do :
|
# To do :
|
||||||
# Method that deletes all questions related to a quiz
|
# Method that deletes all questions related to a quiz
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,131 +1,131 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Gateway;
|
namespace Gateway;
|
||||||
|
|
||||||
use PDO;
|
use PDO;
|
||||||
|
|
||||||
class ResultsGateway
|
class ResultsGateway
|
||||||
{
|
{
|
||||||
private Connection $co;
|
private Connection $co;
|
||||||
|
|
||||||
public function __construct(Connection $co)
|
public function __construct(Connection $co)
|
||||||
{
|
{
|
||||||
$this -> co = $co ;
|
$this -> co = $co ;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createResultsGateway(int $idQuiz, int $idUser, int $nbPts, int $time) : bool
|
public function createResultsGateway(int $idQuiz, int $idUser, int $nbPts, int $time) : bool
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
INSERT INTO Results
|
INSERT INTO Results
|
||||||
VALUES (:id_quiz, :id_user, :nb_pts, :time)
|
VALUES (:id_quiz, :id_user, :nb_pts, :time)
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, [
|
return $this -> co -> executeQuery($query, [
|
||||||
'id_quiz' => array($idQuiz, PDO::PARAM_INT),
|
'id_quiz' => array($idQuiz, PDO::PARAM_INT),
|
||||||
'id_user' => array($idUser, PDO::PARAM_INT),
|
'id_user' => array($idUser, PDO::PARAM_INT),
|
||||||
'nb_pts' => array($nbPts, PDO::PARAM_INT),
|
'nb_pts' => array($nbPts, PDO::PARAM_INT),
|
||||||
'time' => array($time, PDO::PARAM_INT)
|
'time' => array($time, PDO::PARAM_INT)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findResultsByQuiz(int $idQuiz) : array
|
public function findResultsByQuiz(int $idQuiz) : array
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
SELECT * FROM Results
|
SELECT * FROM Results
|
||||||
WHERE quiz_r = :id_quiz
|
WHERE quiz_r = :id_quiz
|
||||||
";
|
";
|
||||||
|
|
||||||
$this -> co -> executeQuery($query, ['id_quiz' => array($idQuiz, PDO::PARAM_INT)]);
|
$this -> co -> executeQuery($query, ['id_quiz' => array($idQuiz, PDO::PARAM_INT)]);
|
||||||
|
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findResultsByUser(int $idUser) : array
|
public function findResultsByUser(int $idUser) : array
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
SELECT * FROM Results
|
SELECT * FROM Results
|
||||||
WHERE user_r = :id_user
|
WHERE user_r = :id_user
|
||||||
";
|
";
|
||||||
|
|
||||||
$this -> co -> executeQuery($query, ['id_user' => array($idUser, PDO::PARAM_INT)]);
|
$this -> co -> executeQuery($query, ['id_user' => array($idUser, PDO::PARAM_INT)]);
|
||||||
|
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findResultsById(int $idQuiz, int $idUser) : array
|
public function findResultsById(int $idQuiz, int $idUser) : array
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
SELECT * FROM Results
|
SELECT * FROM Results
|
||||||
WHERE quiz_r = :id_quiz AND user_r = :id_user
|
WHERE quiz_r = :id_quiz AND user_r = :id_user
|
||||||
";
|
";
|
||||||
|
|
||||||
$this -> co -> executeQuery($query, [
|
$this -> co -> executeQuery($query, [
|
||||||
'id_user' => array($idUser, PDO::PARAM_INT),
|
'id_user' => array($idUser, PDO::PARAM_INT),
|
||||||
'id_quiz' => array($idQuiz, PDO::PARAM_INT)
|
'id_quiz' => array($idQuiz, PDO::PARAM_INT)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findAllResults() : array
|
public function findAllResults() : array
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM Results";
|
$query = "SELECT * FROM Results";
|
||||||
|
|
||||||
$this -> co -> executeQuery($query);
|
$this -> co -> executeQuery($query);
|
||||||
|
|
||||||
return $this -> co -> getResults();
|
return $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateResults(int $idQuiz, int $idUser, ?int $score, ?int $time) : bool
|
public function updateResults(int $idQuiz, int $idUser, ?int $score, ?int $time) : bool
|
||||||
{
|
{
|
||||||
if ($score && !$time)
|
if ($score && !$time)
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
UPDATE Results
|
UPDATE Results
|
||||||
SET score = :score
|
SET score = :score
|
||||||
WHERE quiz_r = :id_quiz AND user_r = :id_user
|
WHERE quiz_r = :id_quiz AND user_r = :id_user
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, [
|
return $this -> co -> executeQuery($query, [
|
||||||
'id_quiz' => array($idQuiz, PDO::PARAM_INT),
|
'id_quiz' => array($idQuiz, PDO::PARAM_INT),
|
||||||
'id_user' => array($idUser, PDO::PARAM_INT),
|
'id_user' => array($idUser, PDO::PARAM_INT),
|
||||||
'score' => array($score, PDO::PARAM_INT)
|
'score' => array($score, PDO::PARAM_INT)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
else if (!$score && $time)
|
else if (!$score && $time)
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
UPDATE Results
|
UPDATE Results
|
||||||
SET time = :time
|
SET time = :time
|
||||||
WHERE quiz_r = :id_quiz AND user_r = :id_user
|
WHERE quiz_r = :id_quiz AND user_r = :id_user
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, [
|
return $this -> co -> executeQuery($query, [
|
||||||
'id_quiz' => array($idQuiz, PDO::PARAM_INT),
|
'id_quiz' => array($idQuiz, PDO::PARAM_INT),
|
||||||
'id_user' => array($idUser, PDO::PARAM_INT),
|
'id_user' => array($idUser, PDO::PARAM_INT),
|
||||||
'time' => array($time, PDO::PARAM_INT)
|
'time' => array($time, PDO::PARAM_INT)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
UPDATE Results
|
UPDATE Results
|
||||||
SET score = :score AND time = :time
|
SET score = :score AND time = :time
|
||||||
WHERE quiz_r = :id_quiz AND user_r = :id_user
|
WHERE quiz_r = :id_quiz AND user_r = :id_user
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, [
|
return $this -> co -> executeQuery($query, [
|
||||||
'id_quiz' => array($idQuiz, PDO::PARAM_INT),
|
'id_quiz' => array($idQuiz, PDO::PARAM_INT),
|
||||||
'id_user' => array($idUser, PDO::PARAM_INT),
|
'id_user' => array($idUser, PDO::PARAM_INT),
|
||||||
'score' => array($score, PDO::PARAM_INT),
|
'score' => array($score, PDO::PARAM_INT),
|
||||||
'time' => array($time, PDO::PARAM_INT)
|
'time' => array($time, PDO::PARAM_INT)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,108 +1,108 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Gateway;
|
namespace Gateway;
|
||||||
use Connection;
|
use Connection;
|
||||||
|
|
||||||
class SourceGateway {
|
class SourceGateway {
|
||||||
|
|
||||||
private Connection $co;
|
private Connection $co;
|
||||||
|
|
||||||
public function __construct(Connection $co)
|
public function __construct(Connection $co)
|
||||||
{
|
{
|
||||||
$this -> co = $co;
|
$this -> co = $co;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function create(sourceEntity $s) : bool
|
public function create(sourceEntity $s) : bool
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
INSERT INTO Source
|
INSERT INTO Source
|
||||||
VALUES(:id_source, :title, :date)
|
VALUES(:id_source, :title, :date)
|
||||||
";
|
";
|
||||||
|
|
||||||
return $this -> co -> executeQuery($query, [
|
return $this -> co -> executeQuery($query, [
|
||||||
"id_source" => array($s->getIdSource(), PDO::PARAM_INT),
|
"id_source" => array($s->getIdSource(), PDO::PARAM_INT),
|
||||||
"title" => array($s->getTitle(), PDO::PARAM_STR),
|
"title" => array($s->getTitle(), PDO::PARAM_STR),
|
||||||
"date" => array($s->getDate(), PDO::PARAM_STR)
|
"date" => array($s->getDate(), PDO::PARAM_STR)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findById(int $id) : array
|
public function findById(int $id) : array
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM Source WHERE id_source = :id";
|
$query = "SELECT * FROM Source WHERE id_source = :id";
|
||||||
|
|
||||||
$this -> co -> executeQuery($query, array("id_source" => array($id, PDO::PARAM_INT)));
|
$this -> co -> executeQuery($query, array("id_source" => array($id, PDO::PARAM_INT)));
|
||||||
return $res = $this -> co -> getResults();
|
return $res = $this -> co -> getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findByTitle(string $t) : array
|
public function findByTitle(string $t) : array
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM Source WHERE title = :t";
|
$query = "SELECT * FROM Source WHERE title = :t";
|
||||||
|
|
||||||
$this -> co -> executeQuery($query, ["title" => array($t, PDO::PARAM_STR)]);
|
$this -> co -> executeQuery($query, ["title" => array($t, PDO::PARAM_STR)]);
|
||||||
return $res = $this -> co -> getResults();
|
return $res = $this -> co -> getResults();
|
||||||
|
|
||||||
// if ($res)
|
// if ($res)
|
||||||
// return new sourceEntity(
|
// return new sourceEntity(
|
||||||
// $res["id_source"],
|
// $res["id_source"],
|
||||||
// $res["title"],
|
// $res["title"],
|
||||||
// $res["date"]
|
// $res["date"]
|
||||||
// );
|
// );
|
||||||
// return null;
|
// return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findByDate(string $d) : array
|
public function findByDate(string $d) : array
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM Source WHERE date = :d";
|
$query = "SELECT * FROM Source WHERE date = :d";
|
||||||
|
|
||||||
$this -> co -> executeQuery($query, ["date" => array($d, PDO::PARAM_STR)]);
|
$this -> co -> executeQuery($query, ["date" => array($d, PDO::PARAM_STR)]);
|
||||||
$res = $this -> co -> getResults();
|
$res = $this -> co -> getResults();
|
||||||
|
|
||||||
if ($res)
|
if ($res)
|
||||||
return new sourceEntity(
|
return new sourceEntity(
|
||||||
$res["id_source"],
|
$res["id_source"],
|
||||||
$res["title"],
|
$res["title"],
|
||||||
$res["date"]
|
$res["date"]
|
||||||
);
|
);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findAll() : array
|
public function findAll() : array
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM Source";
|
$query = "SELECT * FROM Source";
|
||||||
|
|
||||||
$this -> co -> executeQuery($query);
|
$this -> co -> executeQuery($query);
|
||||||
$res = $this -> co -> getResults();
|
$res = $this -> co -> getResults();
|
||||||
|
|
||||||
$sources = [];
|
$sources = [];
|
||||||
|
|
||||||
foreach ($res as $source) {
|
foreach ($res as $source) {
|
||||||
$sources[] = new sourceEntity(
|
$sources[] = new sourceEntity(
|
||||||
$source["id_source"],
|
$source["id_source"],
|
||||||
$source["title"],
|
$source["title"],
|
||||||
$source["date"]
|
$source["date"]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $sources;
|
return $sources;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delete(int $id) : bool
|
public function delete(int $id) : bool
|
||||||
{
|
{
|
||||||
$query = "DELETE FROM Source WHERE id_source = :id_s";
|
$query = "DELETE FROM Source WHERE id_source = :id_s";
|
||||||
|
|
||||||
$this -> co -> executeQuery($query, ["id_s" => array($id, PDO::PARAM_INT)]);
|
$this -> co -> executeQuery($query, ["id_s" => array($id, PDO::PARAM_INT)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update(sourceEntity $s) : bool
|
public function update(sourceEntity $s) : bool
|
||||||
{
|
{
|
||||||
$query = "
|
$query = "
|
||||||
UPDATE Source
|
UPDATE Source
|
||||||
SET title = :t, date = :d
|
SET title = :t, date = :d
|
||||||
WHERE id_source = :id_s
|
WHERE id_source = :id_s
|
||||||
";
|
";
|
||||||
return $this->co->executeQuery($query, [
|
return $this->co->executeQuery($query, [
|
||||||
"id_s" => array($s -> getIdSource(), PDO::PARAM_INT),
|
"id_s" => array($s -> getIdSource(), PDO::PARAM_INT),
|
||||||
"t" => array($s -> getTitle(), PDO::PARAM_STR),
|
"t" => array($s -> getTitle(), PDO::PARAM_STR),
|
||||||
"d" => array($s -> getDate(), PDO::PARAM_STR)
|
"d" => array($s -> getDate(), PDO::PARAM_STR)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,74 +1,74 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Model;
|
namespace Model;
|
||||||
use Entity\CharacterEntity;
|
use Entity\CharacterEntity;
|
||||||
use Gateway\CharacterGateway;
|
use Gateway\CharacterGateway;
|
||||||
|
|
||||||
|
|
||||||
class CharacterModel
|
class CharacterModel
|
||||||
{
|
{
|
||||||
|
|
||||||
private CharacterGateway $gateway;
|
private CharacterGateway $gateway;
|
||||||
|
|
||||||
public function __construct(characterGateway $gw)
|
public function __construct(characterGateway $gw)
|
||||||
{
|
{
|
||||||
$this -> gateway = $gw;
|
$this -> gateway = $gw;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createCharacter(int $id_character, string $name , string $img_char) : bool
|
public function createCharacter(int $id_character, string $name , string $img_char) : bool
|
||||||
{
|
{
|
||||||
return $this -> gateway -> create($id_character, $name, $img_char);
|
return $this -> gateway -> create($id_character, $name, $img_char);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCharacterById(int $id_character) : ?CharacterEntity
|
public function getCharacterById(int $id_character) : ?CharacterEntity
|
||||||
{
|
{
|
||||||
$c = $this -> gateway -> findById($id_character);
|
$c = $this -> gateway -> findById($id_character);
|
||||||
if ($c)
|
if ($c)
|
||||||
return new CharacterEntity(
|
return new CharacterEntity(
|
||||||
$c['id_character'],
|
$c['id_character'],
|
||||||
$c['name'],
|
$c['name'],
|
||||||
$c['img_path']
|
$c['img_path']
|
||||||
);
|
);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCharacterByName(string $name) : ?CharacterEntity
|
public function getCharacterByName(string $name) : ?CharacterEntity
|
||||||
{
|
{
|
||||||
$c = $this -> gateway -> findByName($name);
|
$c = $this -> gateway -> findByName($name);
|
||||||
if ($c)
|
if ($c)
|
||||||
return new CharacterEntity(
|
return new CharacterEntity(
|
||||||
$c[0]['id_character'],
|
$c[0]['id_character'],
|
||||||
$c[0]['name'],
|
$c[0]['name'],
|
||||||
$c[0]['img_path']
|
$c[0]['img_path']
|
||||||
);
|
);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAllCharacters() : array
|
public function getAllCharacters() : array
|
||||||
{
|
{
|
||||||
$c = $this -> gateway -> findAll();
|
$c = $this -> gateway -> findAll();
|
||||||
|
|
||||||
$characters = [];
|
$characters = [];
|
||||||
|
|
||||||
foreach ($c as $character)
|
foreach ($c as $character)
|
||||||
{
|
{
|
||||||
$characters[] = new CharacterEntity(
|
$characters[] = new CharacterEntity(
|
||||||
$character['id_character'],
|
$character['id_character'],
|
||||||
$character['name'],
|
$character['name'],
|
||||||
$character['img_path']
|
$character['img_path']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $characters;
|
return $characters;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteCharacter(int $id_character) : bool
|
public function deleteCharacter(int $id_character) : bool
|
||||||
{
|
{
|
||||||
return $this -> gateway -> delete($id_character);
|
return $this -> gateway -> delete($id_character);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateCharacter(int $id_character, string $name, string $img_char) : bool
|
public function updateCharacter(int $id_character, string $name, string $img_char) : bool
|
||||||
{
|
{
|
||||||
return $this -> gateway -> update($id_character, $name, $img_char);
|
return $this -> gateway -> update($id_character, $name, $img_char);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,71 +1,71 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Model;
|
namespace Model;
|
||||||
use Gateway\FavoriteGateway;
|
use Gateway\FavoriteGateway;
|
||||||
use Entity\FavoriteEntity;
|
use Entity\FavoriteEntity;
|
||||||
|
|
||||||
class FavoriteModel
|
class FavoriteModel
|
||||||
{
|
{
|
||||||
private FavoriteGateway $gw;
|
private FavoriteGateway $gw;
|
||||||
|
|
||||||
public function __construct(FavoriteGateway $gw)
|
public function __construct(FavoriteGateway $gw)
|
||||||
{
|
{
|
||||||
$this -> gw = $gw;
|
$this -> gw = $gw;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createFavoriteModel(int $idUser, int $idQuote) : bool
|
public function createFavoriteModel(int $idUser, int $idQuote) : bool
|
||||||
{
|
{
|
||||||
return $this -> gw -> createFavoriteGateway($idUser, $idQuote);
|
return $this -> gw -> createFavoriteGateway($idUser, $idQuote);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFavoriteById(int $idUser, int $idQuote) : ?FavoriteEntity
|
public function getFavoriteById(int $idUser, int $idQuote) : ?FavoriteEntity
|
||||||
{
|
{
|
||||||
$res = $this -> gw -> findFavoriteById($idUser, $idQuote);
|
$res = $this -> gw -> findFavoriteById($idUser, $idQuote);
|
||||||
|
|
||||||
if ($res)
|
if ($res)
|
||||||
{
|
{
|
||||||
return new FavoriteEntity (
|
return new FavoriteEntity (
|
||||||
$res[0]['user_f'],
|
$res[0]['user_f'],
|
||||||
$res[0]['quote_f'],
|
$res[0]['quote_f'],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFavoriteByUser(int $idUser) : array
|
public function getFavoriteByUser(int $idUser) : array
|
||||||
{
|
{
|
||||||
$res = $this -> gw -> findFavoriteByUser($idUser);
|
$res = $this -> gw -> findFavoriteByUser($idUser);
|
||||||
|
|
||||||
$favorites = [];
|
$favorites = [];
|
||||||
|
|
||||||
foreach ($res as $favorite)
|
foreach ($res as $favorite)
|
||||||
{
|
{
|
||||||
$favorites = new FavoriteEntity (
|
$favorites = new FavoriteEntity (
|
||||||
$favorite['user_f'],
|
$favorite['user_f'],
|
||||||
$favorite['quote_f']
|
$favorite['quote_f']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $favorites;
|
return $favorites;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAllFavorite() : array
|
public function getAllFavorite() : array
|
||||||
{
|
{
|
||||||
$res = $this -> gw -> findAllFavorite();
|
$res = $this -> gw -> findAllFavorite();
|
||||||
|
|
||||||
$favorites = [];
|
$favorites = [];
|
||||||
|
|
||||||
foreach ($res as $favorite)
|
foreach ($res as $favorite)
|
||||||
{
|
{
|
||||||
$favorites = new FavoriteEntity (
|
$favorites = new FavoriteEntity (
|
||||||
$favorite['user_f'],
|
$favorite['user_f'],
|
||||||
$favorite['quote_f']
|
$favorite['quote_f']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $favorites;
|
return $favorites;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeFavorite(int $idUser, int $idQuote) : bool
|
public function removeFavorite(int $idUser, int $idQuote) : bool
|
||||||
{
|
{
|
||||||
return $this -> gw -> deleteFavoriteGateway($idUser, $idQuote);
|
return $this -> gw -> deleteFavoriteGateway($idUser, $idQuote);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,80 +1,80 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Model;
|
namespace Model;
|
||||||
|
|
||||||
use Entity\ImageEntity;
|
use Entity\ImageEntity;
|
||||||
use Gateway\ImageGateway;
|
use Gateway\ImageGateway;
|
||||||
|
|
||||||
class ImageModel
|
class ImageModel
|
||||||
{
|
{
|
||||||
private ImageGateway $gw;
|
private ImageGateway $gw;
|
||||||
|
|
||||||
public function __construct(ImageGateway $gw)
|
public function __construct(ImageGateway $gw)
|
||||||
{
|
{
|
||||||
$this -> gw = $gw;
|
$this -> gw = $gw;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createImgModel(int $idImg, string $imgPath, bool $isImgProfile) : bool
|
public function createImgModel(int $idImg, string $imgPath, bool $isImgProfile) : bool
|
||||||
{
|
{
|
||||||
return $this -> gw -> createImgGateway($idImg, $imgPath, $isImgProfile);
|
return $this -> gw -> createImgGateway($idImg, $imgPath, $isImgProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getImgById(int $idImg) : ?ImageEntity
|
public function getImgById(int $idImg) : ?ImageEntity
|
||||||
{
|
{
|
||||||
$res = $this -> gw -> findImgById($idImg);
|
$res = $this -> gw -> findImgById($idImg);
|
||||||
|
|
||||||
if ($res)
|
if ($res)
|
||||||
{
|
{
|
||||||
return new ImageEntity(
|
return new ImageEntity(
|
||||||
$res[0]['id_image'],
|
$res[0]['id_image'],
|
||||||
$res[0]['img_path'],
|
$res[0]['img_path'],
|
||||||
$res[0]['is_img_prfl']
|
$res[0]['is_img_prfl']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAllImg() : array
|
public function getAllImg() : array
|
||||||
{
|
{
|
||||||
$res = $this -> gw -> findAllImg();
|
$res = $this -> gw -> findAllImg();
|
||||||
|
|
||||||
$images = [];
|
$images = [];
|
||||||
|
|
||||||
foreach ($res as $img)
|
foreach ($res as $img)
|
||||||
{
|
{
|
||||||
$images[] = new ImageEntity(
|
$images[] = new ImageEntity(
|
||||||
$img['id_image'],
|
$img['id_image'],
|
||||||
$img['img_path'],
|
$img['img_path'],
|
||||||
$img['is_img_prfl']
|
$img['is_img_prfl']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $images;
|
return $images;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAllImgProfile() : array
|
public function getAllImgProfile() : array
|
||||||
{
|
{
|
||||||
$res = $this -> gw -> findAllImgProfile();
|
$res = $this -> gw -> findAllImgProfile();
|
||||||
|
|
||||||
$images = [];
|
$images = [];
|
||||||
|
|
||||||
foreach ($res as $img)
|
foreach ($res as $img)
|
||||||
{
|
{
|
||||||
$images[] = new ImageEntity(
|
$images[] = new ImageEntity(
|
||||||
$img['id_image'],
|
$img['id_image'],
|
||||||
$img['img_path'],
|
$img['img_path'],
|
||||||
$img['is_img_prfl']
|
$img['is_img_prfl']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $images;
|
return $images;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteImgModel(int $idImg) : bool
|
public function deleteImgModel(int $idImg) : bool
|
||||||
{
|
{
|
||||||
return $this -> gw -> deleteImgGateway($idImg);
|
return $this -> gw -> deleteImgGateway($idImg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateImgModel(int $idImg, string $imgPath) : bool
|
public function updateImgModel(int $idImg, string $imgPath) : bool
|
||||||
{
|
{
|
||||||
return $this -> gw -> updateImgGateway($idImg, $imgPath);
|
return $this -> gw -> updateImgGateway($idImg, $imgPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,88 +1,88 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Model;
|
namespace Model;
|
||||||
use Gateway\QuestionGateway;
|
use Gateway\QuestionGateway;
|
||||||
use Entity\QuestionEntity;
|
use Entity\QuestionEntity;
|
||||||
|
|
||||||
class QuestionModel
|
class QuestionModel
|
||||||
{
|
{
|
||||||
private QuestionGateway $gateway;
|
private QuestionGateway $gateway;
|
||||||
|
|
||||||
public function __construct(QuestionGateway $gw)
|
public function __construct(QuestionGateway $gw)
|
||||||
{
|
{
|
||||||
$this -> gateway = $gw;
|
$this -> gateway = $gw;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createQuestion(int $id_question, string $question, string $answerA, string $answerB, string $answerC, string $answerD, string $cAnswer): bool
|
public function createQuestion(int $id_question, string $question, string $answerA, string $answerB, string $answerC, string $answerD, string $cAnswer): bool
|
||||||
{
|
{
|
||||||
return $this -> gateway -> create($id_question, $question, $answerA, $answerB, $answerC, $answerD, $cAnswer);
|
return $this -> gateway -> create($id_question, $question, $answerA, $answerB, $answerC, $answerD, $cAnswer);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQuestion(int $id_question) : ?QuestionEntity
|
public function getQuestion(int $id_question) : ?QuestionEntity
|
||||||
{
|
{
|
||||||
$q = $this -> gateway -> findById($id_question);
|
$q = $this -> gateway -> findById($id_question);
|
||||||
if ($q)
|
if ($q)
|
||||||
return new QuestionEntity(
|
return new QuestionEntity(
|
||||||
$q[0]['id_question'],
|
$q[0]['id_question'],
|
||||||
$q[0]['question'],
|
$q[0]['question'],
|
||||||
$q[0]['answera'],
|
$q[0]['answera'],
|
||||||
$q[0]['answerb'],
|
$q[0]['answerb'],
|
||||||
$q[0]['answerc'],
|
$q[0]['answerc'],
|
||||||
$q[0]['answerd'],
|
$q[0]['answerd'],
|
||||||
$q[0]['canswer']
|
$q[0]['canswer']
|
||||||
);
|
);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateTextQuestion(int $id_question, string $question) : bool
|
public function updateTextQuestion(int $id_question, string $question) : bool
|
||||||
{
|
{
|
||||||
return $this -> gateway -> updateText($id_question, $question);
|
return $this -> gateway -> updateText($id_question, $question);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateAnswersQuestion(int $id_question, string $answerA, string $answerB, string $answerC, string $answerD, string $cAnswer): bool
|
public function updateAnswersQuestion(int $id_question, string $answerA, string $answerB, string $answerC, string $answerD, string $cAnswer): bool
|
||||||
{
|
{
|
||||||
return $this -> gateway -> updateAnswers($id_question, $answerA, $answerB, $answerC, $answerD, $cAnswer);
|
return $this -> gateway -> updateAnswers($id_question, $answerA, $answerB, $answerC, $answerD, $cAnswer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteQuestion(int $id_question) : bool
|
public function deleteQuestion(int $id_question) : bool
|
||||||
{
|
{
|
||||||
return $this -> gateway -> delete($id_question);
|
return $this -> gateway -> delete($id_question);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAllQuestions() : array
|
public function getAllQuestions() : array
|
||||||
{
|
{
|
||||||
$q = $this -> gateway -> findAll();
|
$q = $this -> gateway -> findAll();
|
||||||
|
|
||||||
$questions = [];
|
$questions = [];
|
||||||
|
|
||||||
foreach ($q as $question) {
|
foreach ($q as $question) {
|
||||||
$questions[] = new QuestionEntity(
|
$questions[] = new QuestionEntity(
|
||||||
$question['id_question'],
|
$question['id_question'],
|
||||||
$question['question'],
|
$question['question'],
|
||||||
$question['answerA'],
|
$question['answerA'],
|
||||||
$question['answerB'],
|
$question['answerB'],
|
||||||
$question['answerC'],
|
$question['answerC'],
|
||||||
$question['answerD'],
|
$question['answerD'],
|
||||||
$question['cAnswer']
|
$question['cAnswer']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $questions;
|
return $questions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRdmQuestion() : ?QuestionEntity
|
public function getRdmQuestion() : ?QuestionEntity
|
||||||
{
|
{
|
||||||
$q = $this -> gateway -> findRdmQuestion();
|
$q = $this -> gateway -> findRdmQuestion();
|
||||||
if ($q)
|
if ($q)
|
||||||
return new QuestionEntity(
|
return new QuestionEntity(
|
||||||
$q['id_question'],
|
$q['id_question'],
|
||||||
$q['question'],
|
$q['question'],
|
||||||
$q['answerA'],
|
$q['answerA'],
|
||||||
$q['answerB'],
|
$q['answerB'],
|
||||||
$q['answerC'],
|
$q['answerC'],
|
||||||
$q['answerD'],
|
$q['answerD'],
|
||||||
$q['cAnswer']
|
$q['cAnswer']
|
||||||
);
|
);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,80 +1,80 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Model;
|
namespace Model;
|
||||||
|
|
||||||
use Entity\QuestionEntity;
|
use Entity\QuestionEntity;
|
||||||
use Entity\QuizEntity;
|
use Entity\QuizEntity;
|
||||||
use Entity\QuizQuestionEntity;
|
use Entity\QuizQuestionEntity;
|
||||||
use Gateway\Connection;
|
use Gateway\Connection;
|
||||||
use Gateway\QuestionGateway;
|
use Gateway\QuestionGateway;
|
||||||
use Gateway\QuizGateway;
|
use Gateway\QuizGateway;
|
||||||
use Gateway\QuizQuestionGateway;
|
use Gateway\QuizQuestionGateway;
|
||||||
|
|
||||||
class QuizQuestionModel
|
class QuizQuestionModel
|
||||||
{
|
{
|
||||||
private QuizQuestionGateway $gw;
|
private QuizQuestionGateway $gw;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param QuizGateway $gw
|
* @param QuizGateway $gw
|
||||||
*/
|
*/
|
||||||
public function __construct(QuizQuestionGateway $gw)
|
public function __construct(QuizQuestionGateway $gw)
|
||||||
{
|
{
|
||||||
$this->gw = $gw;
|
$this->gw = $gw;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createQuizQuestion(int $idQuiz, int $idQuestion): bool
|
public function createQuizQuestion(int $idQuiz, int $idQuestion): bool
|
||||||
{
|
{
|
||||||
return $this->gw->create($idQuiz,$idQuestion);
|
return $this->gw->create($idQuiz,$idQuestion);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findQuizQuestionByIdQuiz(int $id): ?QuizQuestionEntity
|
public function findQuizQuestionByIdQuiz(int $id): ?QuizQuestionEntity
|
||||||
{
|
{
|
||||||
$q = $this ->gw->findQuizQuestionByIdQuiz($id);
|
$q = $this ->gw->findQuizQuestionByIdQuiz($id);
|
||||||
if ($q) {
|
if ($q) {
|
||||||
return new QuizQuestionEntity(
|
return new QuizQuestionEntity(
|
||||||
$q['idQuiz'],
|
$q['idQuiz'],
|
||||||
$q['idQuestion'],
|
$q['idQuestion'],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAllQuestionByQuiz(int $id, Connection $co): array
|
public function getAllQuestionByQuiz(int $id, Connection $co): array
|
||||||
{
|
{
|
||||||
$q = $this->gw->findQuestionsFromQuiz($id);
|
$q = $this->gw->findQuestionsFromQuiz($id);
|
||||||
|
|
||||||
$questions = [];
|
$questions = [];
|
||||||
$gw = new QuestionGateway($co);
|
$gw = new QuestionGateway($co);
|
||||||
$qmdl = new QuestionModel($gw);
|
$qmdl = new QuestionModel($gw);
|
||||||
|
|
||||||
foreach ($q as $question){
|
foreach ($q as $question){
|
||||||
$questions [] = $qmdl->getQuestion($question[1]);
|
$questions [] = $qmdl->getQuestion($question[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $questions;
|
return $questions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findAll(): array
|
public function findAll(): array
|
||||||
{
|
{
|
||||||
$q = $this -> gw -> findAll();
|
$q = $this -> gw -> findAll();
|
||||||
|
|
||||||
$quizzes = [];
|
$quizzes = [];
|
||||||
|
|
||||||
foreach ($q as $quiz) {
|
foreach ($q as $quiz) {
|
||||||
$quizzes[] = new QuizQuestionEntity(
|
$quizzes[] = new QuizQuestionEntity(
|
||||||
$quiz['idQuiz'],
|
$quiz['idQuiz'],
|
||||||
$quiz['idQuestion']
|
$quiz['idQuestion']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $quizzes;
|
return $quizzes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteQuizQuestion(int $id): bool
|
public function deleteQuizQuestion(int $id): bool
|
||||||
{
|
{
|
||||||
return $this -> gw -> delete($id);
|
return $this -> gw -> delete($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,96 +1,96 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Model;
|
namespace Model;
|
||||||
|
|
||||||
use Entity\ResultsEntity;
|
use Entity\ResultsEntity;
|
||||||
use Gateway\ResultsGateway;
|
use Gateway\ResultsGateway;
|
||||||
|
|
||||||
class ResultsModel
|
class ResultsModel
|
||||||
{
|
{
|
||||||
private ResultsGateway $gw;
|
private ResultsGateway $gw;
|
||||||
|
|
||||||
public function __construct(ResultsGateway $gw)
|
public function __construct(ResultsGateway $gw)
|
||||||
{
|
{
|
||||||
$this -> gw = $gw;
|
$this -> gw = $gw;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createResultsModel(int $idQuiz, int $idUser, int $score, int $time) : bool
|
public function createResultsModel(int $idQuiz, int $idUser, int $score, int $time) : bool
|
||||||
{
|
{
|
||||||
return $this -> gw -> createResultsGateway($idQuiz, $idUser, $score, $time);
|
return $this -> gw -> createResultsGateway($idQuiz, $idUser, $score, $time);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResultsByQuiz(int $idQuiz) : array
|
public function getResultsByQuiz(int $idQuiz) : array
|
||||||
{
|
{
|
||||||
$res = $this -> gw -> findResultsByQuiz($idQuiz);
|
$res = $this -> gw -> findResultsByQuiz($idQuiz);
|
||||||
|
|
||||||
$results = [];
|
$results = [];
|
||||||
|
|
||||||
foreach ($res as $result)
|
foreach ($res as $result)
|
||||||
{
|
{
|
||||||
$results[] = new ResultsEntity (
|
$results[] = new ResultsEntity (
|
||||||
$result['user_r'],
|
$result['user_r'],
|
||||||
$result['quiz_r'],
|
$result['quiz_r'],
|
||||||
$result['score'],
|
$result['score'],
|
||||||
$result['time']
|
$result['time']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResultsByUser(int $idUser) : array
|
public function getResultsByUser(int $idUser) : array
|
||||||
{
|
{
|
||||||
$res = $this -> gw -> findResultsByUser($idUser);
|
$res = $this -> gw -> findResultsByUser($idUser);
|
||||||
|
|
||||||
$results = [];
|
$results = [];
|
||||||
|
|
||||||
foreach ($res as $result)
|
foreach ($res as $result)
|
||||||
{
|
{
|
||||||
$results[] = new ResultsEntity (
|
$results[] = new ResultsEntity (
|
||||||
$result['user_r'],
|
$result['user_r'],
|
||||||
$result['quiz_r'],
|
$result['quiz_r'],
|
||||||
$result['score'],
|
$result['score'],
|
||||||
$result['time']
|
$result['time']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResultsById(int $idQuiz, int $idUser) : ?ResultsEntity
|
public function getResultsById(int $idQuiz, int $idUser) : ?ResultsEntity
|
||||||
{
|
{
|
||||||
$res = $this -> gw -> findResultsById($idQuiz, $idUser);
|
$res = $this -> gw -> findResultsById($idQuiz, $idUser);
|
||||||
|
|
||||||
if ($res)
|
if ($res)
|
||||||
{
|
{
|
||||||
return new ResultsEntity (
|
return new ResultsEntity (
|
||||||
$res['user_r'],
|
$res['user_r'],
|
||||||
$res['quiz_r'],
|
$res['quiz_r'],
|
||||||
$res['score'],
|
$res['score'],
|
||||||
$res['time']
|
$res['time']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAllResults() : array
|
public function getAllResults() : array
|
||||||
{
|
{
|
||||||
$res = $this -> gw -> findAllResults();
|
$res = $this -> gw -> findAllResults();
|
||||||
|
|
||||||
$results = [];
|
$results = [];
|
||||||
|
|
||||||
foreach ($res as $result)
|
foreach ($res as $result)
|
||||||
{
|
{
|
||||||
$results[] = new ResultsEntity (
|
$results[] = new ResultsEntity (
|
||||||
$result['user_r'],
|
$result['user_r'],
|
||||||
$result['quiz_r'],
|
$result['quiz_r'],
|
||||||
$result['score'],
|
$result['score'],
|
||||||
$result['time']
|
$result['time']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateResultsModel(int $idQuiz, int $idUser, ?int $score, ?int $time) : bool
|
public function updateResultsModel(int $idQuiz, int $idUser, ?int $score, ?int $time) : bool
|
||||||
{
|
{
|
||||||
return $this -> gw -> updateResults($idQuiz, $idUser, $score, $time);
|
return $this -> gw -> updateResults($idQuiz, $idUser, $score, $time);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
namespace Model;
|
||||||
|
use Entity\Quote;
|
||||||
|
use Gateway\QuoteGateway;
|
||||||
|
|
||||||
|
class SearchModel
|
||||||
|
{
|
||||||
|
private QuoteGateway $gateway;
|
||||||
|
|
||||||
|
public function __construct(QuoteGateway $gate){
|
||||||
|
$this->gateway = $gate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function searchQuote(?string $type,?string $search,array $filtre): array{
|
||||||
|
|
||||||
|
$res = $this->gateway->search($type,$search,$filtre);
|
||||||
|
$tabQ=[];
|
||||||
|
|
||||||
|
foreach($res as $q ){
|
||||||
|
$tabQ[]= new Quote($q["id_quote"],$q["content"],$q["caracter"],$q["imgpath"],$q["title"],$q["dates"],$q["likes"],$q["langue"]) ;
|
||||||
|
}
|
||||||
|
return $tabQ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
@ -1,85 +1,85 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Model;
|
namespace Model;
|
||||||
use Entity\SourceEntity;
|
use Entity\SourceEntity;
|
||||||
use Gateway\SourceGateway;
|
use Gateway\SourceGateway;
|
||||||
|
|
||||||
class SourceModel
|
class SourceModel
|
||||||
{
|
{
|
||||||
|
|
||||||
private sourceGateway $gateway;
|
private sourceGateway $gateway;
|
||||||
|
|
||||||
public function __construct(SourceGateway $gateway)
|
public function __construct(SourceGateway $gateway)
|
||||||
{
|
{
|
||||||
$this -> gateway = $gateway;
|
$this -> gateway = $gateway;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createSource(int $id_source, string $title, string $date) : bool
|
public function createSource(int $id_source, string $title, string $date) : bool
|
||||||
{
|
{
|
||||||
$q = new SourceEntity($id_source , $title, $date);
|
$q = new SourceEntity($id_source , $title, $date);
|
||||||
|
|
||||||
return $this -> gateway -> create($q);
|
return $this -> gateway -> create($q);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSourceById(int $id_source) : ?SourceEntity
|
public function getSourceById(int $id_source) : ?SourceEntity
|
||||||
{
|
{
|
||||||
$res = $this -> gateway -> findById($id_source);
|
$res = $this -> gateway -> findById($id_source);
|
||||||
|
|
||||||
if ($res)
|
if ($res)
|
||||||
return new sourceEntity(
|
return new sourceEntity(
|
||||||
$res[0]["id_source"],
|
$res[0]["id_source"],
|
||||||
$res[0]["title"],
|
$res[0]["title"],
|
||||||
$res[0]["date"]
|
$res[0]["date"]
|
||||||
);
|
);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSourceByTitle(string $title) : array
|
public function getSourceByTitle(string $title) : array
|
||||||
{
|
{
|
||||||
$res = $this->gateway->findByTitle($title);
|
$res = $this->gateway->findByTitle($title);
|
||||||
foreach ($res as $sources) {
|
foreach ($res as $sources) {
|
||||||
$src[] = new sourceEntity(
|
$src[] = new sourceEntity(
|
||||||
$sources["id_source"],
|
$sources["id_source"],
|
||||||
$sources["title"],
|
$sources["title"],
|
||||||
$sources["date"]
|
$sources["date"]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $src;
|
return $src;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSourceByDate(string $date) : array
|
public function getSourceByDate(string $date) : array
|
||||||
{
|
{
|
||||||
$res = $this->gateway->findByDate($date);
|
$res = $this->gateway->findByDate($date);
|
||||||
foreach ($res as $sources) {
|
foreach ($res as $sources) {
|
||||||
$src[] = new sourceEntity(
|
$src[] = new sourceEntity(
|
||||||
$sources["id_source"],
|
$sources["id_source"],
|
||||||
$sources["title"],
|
$sources["title"],
|
||||||
$sources["date"]
|
$sources["date"]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $src;
|
return $src;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSources() : array
|
public function getSources() : array
|
||||||
{
|
{
|
||||||
return $this -> gateway -> findAll();
|
return $this -> gateway -> findAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteSource(int $id_source) : bool
|
public function deleteSource(int $id_source) : bool
|
||||||
{
|
{
|
||||||
return $this -> gateway -> delete($id_source);
|
return $this -> gateway -> delete($id_source);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateSource(int $id_source, string $title, string $date) : bool
|
public function updateSource(int $id_source, string $title, string $date) : bool
|
||||||
{
|
{
|
||||||
$q = $this -> getSourceById($id_source);
|
$q = $this -> getSourceById($id_source);
|
||||||
|
|
||||||
if ($q){
|
if ($q){
|
||||||
$q -> setTitle($title);
|
$q -> setTitle($title);
|
||||||
$q -> setDate($date);
|
$q -> setDate($date);
|
||||||
return $this -> gateway -> update($q);
|
return $this -> gateway -> update($q);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,302 +1,302 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2012 Danny van Kooten <hi@dannyvankooten.com>
|
Copyright (c) 2012 Danny van Kooten <hi@dannyvankooten.com>
|
||||||
|
|
||||||
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:
|
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 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.
|
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
|
class AltoRouter
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array Array of all routes (incl. named routes).
|
* @var array Array of all routes (incl. named routes).
|
||||||
*/
|
*/
|
||||||
protected $routes = [];
|
protected $routes = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array Array of all named routes.
|
* @var array Array of all named routes.
|
||||||
*/
|
*/
|
||||||
protected $namedRoutes = [];
|
protected $namedRoutes = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Can be used to ignore leading part of the Request URL (if main file lives in subdirectory of host)
|
* @var string Can be used to ignore leading part of the Request URL (if main file lives in subdirectory of host)
|
||||||
*/
|
*/
|
||||||
protected $basePath = '';
|
protected $basePath = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array Array of default match types (regex helpers)
|
* @var array Array of default match types (regex helpers)
|
||||||
*/
|
*/
|
||||||
protected $matchTypes = [
|
protected $matchTypes = [
|
||||||
'i' => '[0-9]++',
|
'i' => '[0-9]++',
|
||||||
'a' => '[0-9A-Za-z]++',
|
'a' => '[0-9A-Za-z]++',
|
||||||
'h' => '[0-9A-Fa-f]++',
|
'h' => '[0-9A-Fa-f]++',
|
||||||
'*' => '.+?',
|
'*' => '.+?',
|
||||||
'**' => '.++',
|
'**' => '.++',
|
||||||
'' => '[^/\.]++'
|
'' => '[^/\.]++'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create router in one call from config.
|
* Create router in one call from config.
|
||||||
*
|
*
|
||||||
* @param array $routes
|
* @param array $routes
|
||||||
* @param string $basePath
|
* @param string $basePath
|
||||||
* @param array $matchTypes
|
* @param array $matchTypes
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function __construct(array $routes = [], $basePath = '', array $matchTypes = [])
|
public function __construct(array $routes = [], $basePath = '', array $matchTypes = [])
|
||||||
{
|
{
|
||||||
$this->addRoutes($routes);
|
$this->addRoutes($routes);
|
||||||
$this->setBasePath($basePath);
|
$this->setBasePath($basePath);
|
||||||
$this->addMatchTypes($matchTypes);
|
$this->addMatchTypes($matchTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves all routes.
|
* Retrieves all routes.
|
||||||
* Useful if you want to process or display routes.
|
* Useful if you want to process or display routes.
|
||||||
* @return array All routes.
|
* @return array All routes.
|
||||||
*/
|
*/
|
||||||
public function getRoutes()
|
public function getRoutes()
|
||||||
{
|
{
|
||||||
return $this->routes;
|
return $this->routes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add multiple routes at once from array in the following format:
|
* Add multiple routes at once from array in the following format:
|
||||||
*
|
*
|
||||||
* $routes = [
|
* $routes = [
|
||||||
* [$method, $route, $target, $name]
|
* [$method, $route, $target, $name]
|
||||||
* ];
|
* ];
|
||||||
*
|
*
|
||||||
* @param array $routes
|
* @param array $routes
|
||||||
* @return void
|
* @return void
|
||||||
* @author Koen Punt
|
* @author Koen Punt
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function addRoutes($routes)
|
public function addRoutes($routes)
|
||||||
{
|
{
|
||||||
if (!is_array($routes) && !$routes instanceof Traversable) {
|
if (!is_array($routes) && !$routes instanceof Traversable) {
|
||||||
throw new RuntimeException('Routes should be an array or an instance of Traversable');
|
throw new RuntimeException('Routes should be an array or an instance of Traversable');
|
||||||
}
|
}
|
||||||
foreach ($routes as $route) {
|
foreach ($routes as $route) {
|
||||||
call_user_func_array([$this, 'map'], $route);
|
call_user_func_array([$this, 'map'], $route);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the base path.
|
* Set the base path.
|
||||||
* Useful if you are running your application from a subdirectory.
|
* Useful if you are running your application from a subdirectory.
|
||||||
* @param string $basePath
|
* @param string $basePath
|
||||||
*/
|
*/
|
||||||
public function setBasePath($basePath)
|
public function setBasePath($basePath)
|
||||||
{
|
{
|
||||||
$this->basePath = $basePath;
|
$this->basePath = $basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add named match types. It uses array_merge so keys can be overwritten.
|
* 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.
|
* @param array $matchTypes The key is the name and the value is the regex.
|
||||||
*/
|
*/
|
||||||
public function addMatchTypes(array $matchTypes)
|
public function addMatchTypes(array $matchTypes)
|
||||||
{
|
{
|
||||||
$this->matchTypes = array_merge($this->matchTypes, $matchTypes);
|
$this->matchTypes = array_merge($this->matchTypes, $matchTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map a route to a target
|
* 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 $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 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 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.
|
* @param string $name Optional name of this route. Supply if you want to reverse route this url in your application.
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function map($method, $route, $target, $name = null)
|
public function map($method, $route, $target, $name = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->routes[] = [$method, $route, $target, $name];
|
$this->routes[] = [$method, $route, $target, $name];
|
||||||
|
|
||||||
if ($name) {
|
if ($name) {
|
||||||
if (isset($this->namedRoutes[$name])) {
|
if (isset($this->namedRoutes[$name])) {
|
||||||
throw new RuntimeException("Can not redeclare route '{$name}'");
|
throw new RuntimeException("Can not redeclare route '{$name}'");
|
||||||
}
|
}
|
||||||
$this->namedRoutes[$name] = $route;
|
$this->namedRoutes[$name] = $route;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reversed routing
|
* Reversed routing
|
||||||
*
|
*
|
||||||
* Generate the URL for a named route. Replace regexes with supplied parameters
|
* Generate the URL for a named route. Replace regexes with supplied parameters
|
||||||
*
|
*
|
||||||
* @param string $routeName The name of the route.
|
* @param string $routeName The name of the route.
|
||||||
* @param array @params Associative array of parameters to replace placeholders with.
|
* @param array @params Associative array of parameters to replace placeholders with.
|
||||||
* @return string The URL of the route with named parameters in place.
|
* @return string The URL of the route with named parameters in place.
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function generate($routeName, array $params = [])
|
public function generate($routeName, array $params = [])
|
||||||
{
|
{
|
||||||
|
|
||||||
// Check if named route exists
|
// Check if named route exists
|
||||||
if (!isset($this->namedRoutes[$routeName])) {
|
if (!isset($this->namedRoutes[$routeName])) {
|
||||||
throw new RuntimeException("Route '{$routeName}' does not exist.");
|
throw new RuntimeException("Route '{$routeName}' does not exist.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace named parameters
|
// Replace named parameters
|
||||||
$route = $this->namedRoutes[$routeName];
|
$route = $this->namedRoutes[$routeName];
|
||||||
|
|
||||||
// prepend base path to route url again
|
// prepend base path to route url again
|
||||||
$url = $this->basePath . $route;
|
$url = $this->basePath . $route;
|
||||||
|
|
||||||
if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) {
|
if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) {
|
||||||
foreach ($matches as $index => $match) {
|
foreach ($matches as $index => $match) {
|
||||||
list($block, $pre, $type, $param, $optional) = $match;
|
list($block, $pre, $type, $param, $optional) = $match;
|
||||||
|
|
||||||
if ($pre) {
|
if ($pre) {
|
||||||
$block = substr($block, 1);
|
$block = substr($block, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($params[$param])) {
|
if (isset($params[$param])) {
|
||||||
// Part is found, replace for param value
|
// Part is found, replace for param value
|
||||||
$url = str_replace($block, $params[$param], $url);
|
$url = str_replace($block, $params[$param], $url);
|
||||||
} elseif ($optional && $index !== 0) {
|
} elseif ($optional && $index !== 0) {
|
||||||
// Only strip preceding slash if it's not at the base
|
// Only strip preceding slash if it's not at the base
|
||||||
$url = str_replace($pre . $block, '', $url);
|
$url = str_replace($pre . $block, '', $url);
|
||||||
} else {
|
} else {
|
||||||
// Strip match block
|
// Strip match block
|
||||||
$url = str_replace($block, '', $url);
|
$url = str_replace($block, '', $url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Match a given Request Url against stored routes
|
* Match a given Request Url against stored routes
|
||||||
* @param string $requestUrl
|
* @param string $requestUrl
|
||||||
* @param string $requestMethod
|
* @param string $requestMethod
|
||||||
* @return array|boolean Array with route information on success, false on failure (no match).
|
* @return array|boolean Array with route information on success, false on failure (no match).
|
||||||
*/
|
*/
|
||||||
public function match($requestUrl = null, $requestMethod = null)
|
public function match($requestUrl = null, $requestMethod = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
$params = [];
|
$params = [];
|
||||||
|
|
||||||
// set Request Url if it isn't passed as parameter
|
// set Request Url if it isn't passed as parameter
|
||||||
if ($requestUrl === null) {
|
if ($requestUrl === null) {
|
||||||
$requestUrl = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
|
$requestUrl = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
// strip base path from request url
|
// strip base path from request url
|
||||||
$requestUrl = substr($requestUrl, strlen($this->basePath));
|
$requestUrl = substr($requestUrl, strlen($this->basePath));
|
||||||
|
|
||||||
// Strip query string (?a=b) from Request Url
|
// Strip query string (?a=b) from Request Url
|
||||||
if (($strpos = strpos($requestUrl, '?')) !== false) {
|
if (($strpos = strpos($requestUrl, '?')) !== false) {
|
||||||
$requestUrl = substr($requestUrl, 0, $strpos);
|
$requestUrl = substr($requestUrl, 0, $strpos);
|
||||||
}
|
}
|
||||||
|
|
||||||
$lastRequestUrlChar = $requestUrl ? $requestUrl[strlen($requestUrl)-1] : '';
|
$lastRequestUrlChar = $requestUrl ? $requestUrl[strlen($requestUrl)-1] : '';
|
||||||
|
|
||||||
// set Request Method if it isn't passed as a parameter
|
// set Request Method if it isn't passed as a parameter
|
||||||
if ($requestMethod === null) {
|
if ($requestMethod === null) {
|
||||||
$requestMethod = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
|
$requestMethod = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->routes as $handler) {
|
foreach ($this->routes as $handler) {
|
||||||
list($methods, $route, $target, $name) = $handler;
|
list($methods, $route, $target, $name) = $handler;
|
||||||
|
|
||||||
$method_match = (stripos($methods, $requestMethod) !== false);
|
$method_match = (stripos($methods, $requestMethod) !== false);
|
||||||
|
|
||||||
// Method did not match, continue to next route.
|
// Method did not match, continue to next route.
|
||||||
if (!$method_match) {
|
if (!$method_match) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($route === '*') {
|
if ($route === '*') {
|
||||||
// * wildcard (matches all)
|
// * wildcard (matches all)
|
||||||
$match = true;
|
$match = true;
|
||||||
} elseif (isset($route[0]) && $route[0] === '@') {
|
} elseif (isset($route[0]) && $route[0] === '@') {
|
||||||
// @ regex delimiter
|
// @ regex delimiter
|
||||||
$pattern = '`' . substr($route, 1) . '`u';
|
$pattern = '`' . substr($route, 1) . '`u';
|
||||||
$match = preg_match($pattern, $requestUrl, $params) === 1;
|
$match = preg_match($pattern, $requestUrl, $params) === 1;
|
||||||
} elseif (($position = strpos($route, '[')) === false) {
|
} elseif (($position = strpos($route, '[')) === false) {
|
||||||
// No params in url, do string comparison
|
// No params in url, do string comparison
|
||||||
$match = strcmp($requestUrl, $route) === 0;
|
$match = strcmp($requestUrl, $route) === 0;
|
||||||
} else {
|
} else {
|
||||||
// Compare longest non-param string with url before moving on to regex
|
// 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)
|
// 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] !== '/')) {
|
if (strncmp($requestUrl, $route, $position) !== 0 && ($lastRequestUrlChar === '/' || $route[$position-1] !== '/')) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$regex = $this->compileRoute($route);
|
$regex = $this->compileRoute($route);
|
||||||
$match = preg_match($regex, $requestUrl, $params) === 1;
|
$match = preg_match($regex, $requestUrl, $params) === 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($match) {
|
if ($match) {
|
||||||
if ($params) {
|
if ($params) {
|
||||||
foreach ($params as $key => $value) {
|
foreach ($params as $key => $value) {
|
||||||
if (is_numeric($key)) {
|
if (is_numeric($key)) {
|
||||||
unset($params[$key]);
|
unset($params[$key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'target' => $target,
|
'target' => $target,
|
||||||
'params' => $params,
|
'params' => $params,
|
||||||
'name' => $name
|
'name' => $name
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compile the regex for a given route (EXPENSIVE)
|
* Compile the regex for a given route (EXPENSIVE)
|
||||||
* @param $route
|
* @param $route
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function compileRoute($route)
|
protected function compileRoute($route)
|
||||||
{
|
{
|
||||||
if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) {
|
if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) {
|
||||||
$matchTypes = $this->matchTypes;
|
$matchTypes = $this->matchTypes;
|
||||||
foreach ($matches as $match) {
|
foreach ($matches as $match) {
|
||||||
list($block, $pre, $type, $param, $optional) = $match;
|
list($block, $pre, $type, $param, $optional) = $match;
|
||||||
|
|
||||||
if (isset($matchTypes[$type])) {
|
if (isset($matchTypes[$type])) {
|
||||||
$type = $matchTypes[$type];
|
$type = $matchTypes[$type];
|
||||||
}
|
}
|
||||||
if ($pre === '.') {
|
if ($pre === '.') {
|
||||||
$pre = '\.';
|
$pre = '\.';
|
||||||
}
|
}
|
||||||
|
|
||||||
$optional = $optional !== '' ? '?' : null;
|
$optional = $optional !== '' ? '?' : null;
|
||||||
|
|
||||||
//Older versions of PCRE require the 'P' in (?P<named>)
|
//Older versions of PCRE require the 'P' in (?P<named>)
|
||||||
$pattern = '(?:'
|
$pattern = '(?:'
|
||||||
. ($pre !== '' ? $pre : null)
|
. ($pre !== '' ? $pre : null)
|
||||||
. '('
|
. '('
|
||||||
. ($param !== '' ? "?P<$param>" : null)
|
. ($param !== '' ? "?P<$param>" : null)
|
||||||
. $type
|
. $type
|
||||||
. ')'
|
. ')'
|
||||||
. $optional
|
. $optional
|
||||||
. ')'
|
. ')'
|
||||||
. $optional;
|
. $optional;
|
||||||
|
|
||||||
$route = str_replace($block, $pattern, $route);
|
$route = str_replace($block, $pattern, $route);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "`^$route$`u";
|
return "`^$route$`u";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2012 Danny van Kooten <hi@dannyvankooten.com>
|
Copyright (c) 2012 Danny van Kooten <hi@dannyvankooten.com>
|
||||||
|
|
||||||
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:
|
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 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.
|
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.
|
@ -1,56 +1,56 @@
|
|||||||
# AltoRouter [](https://travis-ci.org/dannyvankooten/AltoRouter) [](https://packagist.org/packages/altorouter/altorouter) [](https://packagist.org/packages/altorouter/altorouter) [](https://codeclimate.com/github/dannyvankooten/AltoRouter) [](https://codeclimate.com/github/dannyvankooten/AltoRouter)
|
# AltoRouter [](https://travis-ci.org/dannyvankooten/AltoRouter) [](https://packagist.org/packages/altorouter/altorouter) [](https://packagist.org/packages/altorouter/altorouter) [](https://codeclimate.com/github/dannyvankooten/AltoRouter) [](https://codeclimate.com/github/dannyvankooten/AltoRouter)
|
||||||
AltoRouter is a small but powerful routing class, heavily inspired by [klein.php](https://github.com/chriso/klein.php/).
|
AltoRouter is a small but powerful routing class, heavily inspired by [klein.php](https://github.com/chriso/klein.php/).
|
||||||
|
|
||||||
```php
|
```php
|
||||||
$router = new AltoRouter();
|
$router = new AltoRouter();
|
||||||
|
|
||||||
// map homepage
|
// map homepage
|
||||||
$router->map('GET', '/', function() {
|
$router->map('GET', '/', function() {
|
||||||
require __DIR__ . '/views/home.php';
|
require __DIR__ . '/views/home.php';
|
||||||
});
|
});
|
||||||
|
|
||||||
// dynamic named route
|
// dynamic named route
|
||||||
$router->map('GET|POST', '/users/[i:id]/', function($id) {
|
$router->map('GET|POST', '/users/[i:id]/', function($id) {
|
||||||
$user = .....
|
$user = .....
|
||||||
require __DIR__ . '/views/user/details.php';
|
require __DIR__ . '/views/user/details.php';
|
||||||
}, 'user-details');
|
}, 'user-details');
|
||||||
|
|
||||||
// echo URL to user-details page for ID 5
|
// echo URL to user-details page for ID 5
|
||||||
echo $router->generate('user-details', ['id' => 5]); // Output: "/users/5"
|
echo $router->generate('user-details', ['id' => 5]); // Output: "/users/5"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* Can be used with all HTTP Methods
|
* Can be used with all HTTP Methods
|
||||||
* Dynamic routing with named route parameters
|
* Dynamic routing with named route parameters
|
||||||
* Reversed routing
|
* Reversed routing
|
||||||
* Flexible regular expression routing (inspired by [Sinatra](http://www.sinatrarb.com/))
|
* Flexible regular expression routing (inspired by [Sinatra](http://www.sinatrarb.com/))
|
||||||
* Custom regexes
|
* Custom regexes
|
||||||
|
|
||||||
## Getting started
|
## 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.
|
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)
|
- [Install AltoRouter](http://altorouter.com/usage/install.html)
|
||||||
- [Rewrite all requests to AltoRouter](http://altorouter.com/usage/rewrite-requests.html)
|
- [Rewrite all requests to AltoRouter](http://altorouter.com/usage/rewrite-requests.html)
|
||||||
- [Map your routes](http://altorouter.com/usage/mapping-routes.html)
|
- [Map your routes](http://altorouter.com/usage/mapping-routes.html)
|
||||||
- [Match requests](http://altorouter.com/usage/matching-requests.html)
|
- [Match requests](http://altorouter.com/usage/matching-requests.html)
|
||||||
- [Process the request your preferred way](http://altorouter.com/usage/processing-requests.html)
|
- [Process the request your preferred way](http://altorouter.com/usage/processing-requests.html)
|
||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
- [Danny van Kooten](https://github.com/dannyvankooten)
|
- [Danny van Kooten](https://github.com/dannyvankooten)
|
||||||
- [Koen Punt](https://github.com/koenpunt)
|
- [Koen Punt](https://github.com/koenpunt)
|
||||||
- [John Long](https://github.com/adduc)
|
- [John Long](https://github.com/adduc)
|
||||||
- [Niahoo Osef](https://github.com/niahoo)
|
- [Niahoo Osef](https://github.com/niahoo)
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2012 Danny van Kooten <hi@dannyvankooten.com>
|
Copyright (c) 2012 Danny van Kooten <hi@dannyvankooten.com>
|
||||||
|
|
||||||
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:
|
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 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.
|
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.
|
||||||
|
@ -1,36 +1,36 @@
|
|||||||
{
|
{
|
||||||
"name": "altorouter/altorouter",
|
"name": "altorouter/altorouter",
|
||||||
"description": "A lightning fast router for PHP",
|
"description": "A lightning fast router for PHP",
|
||||||
"keywords": ["router", "routing", "lightweight"],
|
"keywords": ["router", "routing", "lightweight"],
|
||||||
"homepage": "https://github.com/dannyvankooten/AltoRouter",
|
"homepage": "https://github.com/dannyvankooten/AltoRouter",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Danny van Kooten",
|
"name": "Danny van Kooten",
|
||||||
"email": "dannyvankooten@gmail.com",
|
"email": "dannyvankooten@gmail.com",
|
||||||
"homepage": "http://dannyvankooten.com/"
|
"homepage": "http://dannyvankooten.com/"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Koen Punt",
|
"name": "Koen Punt",
|
||||||
"homepage": "https://github.com/koenpunt"
|
"homepage": "https://github.com/koenpunt"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "niahoo",
|
"name": "niahoo",
|
||||||
"homepage": "https://github.com/niahoo"
|
"homepage": "https://github.com/niahoo"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.6.0"
|
"php": ">=5.6.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "5.7.*",
|
"phpunit/phpunit": "5.7.*",
|
||||||
"codeclimate/php-test-reporter": "dev-master",
|
"codeclimate/php-test-reporter": "dev-master",
|
||||||
"squizlabs/php_codesniffer": "3.4.2"
|
"squizlabs/php_codesniffer": "3.4.2"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"classmap": ["AltoRouter.php"]
|
"classmap": ["AltoRouter.php"]
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "vendor/bin/phpunit"
|
"test": "vendor/bin/phpunit"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<ruleset name="rules">
|
<ruleset name="rules">
|
||||||
<description>rules</description>
|
<description>rules</description>
|
||||||
<rule ref="PSR2"/>
|
<rule ref="PSR2"/>
|
||||||
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
|
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
|
||||||
<file>tests</file>
|
<file>tests</file>
|
||||||
<file>AltoRouter.php</file>
|
<file>AltoRouter.php</file>
|
||||||
<file>examples/</file>
|
<file>examples/</file>
|
||||||
<arg name="colors"/>
|
<arg name="colors"/>
|
||||||
</ruleset>
|
</ruleset>
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// autoload.php @generated by Composer
|
// autoload.php @generated by Composer
|
||||||
|
|
||||||
if (PHP_VERSION_ID < 50600) {
|
if (PHP_VERSION_ID < 50600) {
|
||||||
if (!headers_sent()) {
|
if (!headers_sent()) {
|
||||||
header('HTTP/1.1 500 Internal Server Error');
|
header('HTTP/1.1 500 Internal Server Error');
|
||||||
}
|
}
|
||||||
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
|
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
|
||||||
if (!ini_get('display_errors')) {
|
if (!ini_get('display_errors')) {
|
||||||
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
||||||
fwrite(STDERR, $err);
|
fwrite(STDERR, $err);
|
||||||
} elseif (!headers_sent()) {
|
} elseif (!headers_sent()) {
|
||||||
echo $err;
|
echo $err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
trigger_error(
|
trigger_error(
|
||||||
$err,
|
$err,
|
||||||
E_USER_ERROR
|
E_USER_ERROR
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once __DIR__ . '/composer/autoload_real.php';
|
require_once __DIR__ . '/composer/autoload_real.php';
|
||||||
|
|
||||||
return ComposerAutoloaderInit68804b2111cb6b8bf6edf66cb2b4669c::getLoader();
|
return ComposerAutoloaderInit68804b2111cb6b8bf6edf66cb2b4669c::getLoader();
|
||||||
|
@ -1,359 +1,359 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of Composer.
|
* This file is part of Composer.
|
||||||
*
|
*
|
||||||
* (c) Nils Adermann <naderman@naderman.de>
|
* (c) Nils Adermann <naderman@naderman.de>
|
||||||
* Jordi Boggiano <j.boggiano@seld.be>
|
* Jordi Boggiano <j.boggiano@seld.be>
|
||||||
*
|
*
|
||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Composer;
|
namespace Composer;
|
||||||
|
|
||||||
use Composer\Autoload\ClassLoader;
|
use Composer\Autoload\ClassLoader;
|
||||||
use Composer\Semver\VersionParser;
|
use Composer\Semver\VersionParser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is copied in every Composer installed project and available to all
|
* This class is copied in every Composer installed project and available to all
|
||||||
*
|
*
|
||||||
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
||||||
*
|
*
|
||||||
* To require its presence, you can require `composer-runtime-api ^2.0`
|
* To require its presence, you can require `composer-runtime-api ^2.0`
|
||||||
*
|
*
|
||||||
* @final
|
* @final
|
||||||
*/
|
*/
|
||||||
class InstalledVersions
|
class InstalledVersions
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var mixed[]|null
|
* @var mixed[]|null
|
||||||
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
|
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
|
||||||
*/
|
*/
|
||||||
private static $installed;
|
private static $installed;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var bool|null
|
* @var bool|null
|
||||||
*/
|
*/
|
||||||
private static $canGetVendors;
|
private static $canGetVendors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array[]
|
* @var array[]
|
||||||
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||||
*/
|
*/
|
||||||
private static $installedByVendor = array();
|
private static $installedByVendor = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of all package names which are present, either by being installed, replaced or provided
|
* Returns a list of all package names which are present, either by being installed, replaced or provided
|
||||||
*
|
*
|
||||||
* @return string[]
|
* @return string[]
|
||||||
* @psalm-return list<string>
|
* @psalm-return list<string>
|
||||||
*/
|
*/
|
||||||
public static function getInstalledPackages()
|
public static function getInstalledPackages()
|
||||||
{
|
{
|
||||||
$packages = array();
|
$packages = array();
|
||||||
foreach (self::getInstalled() as $installed) {
|
foreach (self::getInstalled() as $installed) {
|
||||||
$packages[] = array_keys($installed['versions']);
|
$packages[] = array_keys($installed['versions']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (1 === \count($packages)) {
|
if (1 === \count($packages)) {
|
||||||
return $packages[0];
|
return $packages[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
|
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of all package names with a specific type e.g. 'library'
|
* Returns a list of all package names with a specific type e.g. 'library'
|
||||||
*
|
*
|
||||||
* @param string $type
|
* @param string $type
|
||||||
* @return string[]
|
* @return string[]
|
||||||
* @psalm-return list<string>
|
* @psalm-return list<string>
|
||||||
*/
|
*/
|
||||||
public static function getInstalledPackagesByType($type)
|
public static function getInstalledPackagesByType($type)
|
||||||
{
|
{
|
||||||
$packagesByType = array();
|
$packagesByType = array();
|
||||||
|
|
||||||
foreach (self::getInstalled() as $installed) {
|
foreach (self::getInstalled() as $installed) {
|
||||||
foreach ($installed['versions'] as $name => $package) {
|
foreach ($installed['versions'] as $name => $package) {
|
||||||
if (isset($package['type']) && $package['type'] === $type) {
|
if (isset($package['type']) && $package['type'] === $type) {
|
||||||
$packagesByType[] = $name;
|
$packagesByType[] = $name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $packagesByType;
|
return $packagesByType;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether the given package is installed
|
* Checks whether the given package is installed
|
||||||
*
|
*
|
||||||
* This also returns true if the package name is provided or replaced by another package
|
* This also returns true if the package name is provided or replaced by another package
|
||||||
*
|
*
|
||||||
* @param string $packageName
|
* @param string $packageName
|
||||||
* @param bool $includeDevRequirements
|
* @param bool $includeDevRequirements
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function isInstalled($packageName, $includeDevRequirements = true)
|
public static function isInstalled($packageName, $includeDevRequirements = true)
|
||||||
{
|
{
|
||||||
foreach (self::getInstalled() as $installed) {
|
foreach (self::getInstalled() as $installed) {
|
||||||
if (isset($installed['versions'][$packageName])) {
|
if (isset($installed['versions'][$packageName])) {
|
||||||
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
|
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether the given package satisfies a version constraint
|
* Checks whether the given package satisfies a version constraint
|
||||||
*
|
*
|
||||||
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
|
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
|
||||||
*
|
*
|
||||||
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
|
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
|
||||||
*
|
*
|
||||||
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
|
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
|
||||||
* @param string $packageName
|
* @param string $packageName
|
||||||
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
|
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
||||||
{
|
{
|
||||||
$constraint = $parser->parseConstraints((string) $constraint);
|
$constraint = $parser->parseConstraints((string) $constraint);
|
||||||
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
|
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
|
||||||
|
|
||||||
return $provided->matches($constraint);
|
return $provided->matches($constraint);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a version constraint representing all the range(s) which are installed for a given package
|
* Returns a version constraint representing all the range(s) which are installed for a given package
|
||||||
*
|
*
|
||||||
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
|
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
|
||||||
* whether a given version of a package is installed, and not just whether it exists
|
* whether a given version of a package is installed, and not just whether it exists
|
||||||
*
|
*
|
||||||
* @param string $packageName
|
* @param string $packageName
|
||||||
* @return string Version constraint usable with composer/semver
|
* @return string Version constraint usable with composer/semver
|
||||||
*/
|
*/
|
||||||
public static function getVersionRanges($packageName)
|
public static function getVersionRanges($packageName)
|
||||||
{
|
{
|
||||||
foreach (self::getInstalled() as $installed) {
|
foreach (self::getInstalled() as $installed) {
|
||||||
if (!isset($installed['versions'][$packageName])) {
|
if (!isset($installed['versions'][$packageName])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ranges = array();
|
$ranges = array();
|
||||||
if (isset($installed['versions'][$packageName]['pretty_version'])) {
|
if (isset($installed['versions'][$packageName]['pretty_version'])) {
|
||||||
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
|
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
|
||||||
}
|
}
|
||||||
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
|
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
|
||||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
|
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
|
||||||
}
|
}
|
||||||
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
|
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
|
||||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
|
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
|
||||||
}
|
}
|
||||||
if (array_key_exists('provided', $installed['versions'][$packageName])) {
|
if (array_key_exists('provided', $installed['versions'][$packageName])) {
|
||||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
|
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
|
||||||
}
|
}
|
||||||
|
|
||||||
return implode(' || ', $ranges);
|
return implode(' || ', $ranges);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $packageName
|
* @param string $packageName
|
||||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
||||||
*/
|
*/
|
||||||
public static function getVersion($packageName)
|
public static function getVersion($packageName)
|
||||||
{
|
{
|
||||||
foreach (self::getInstalled() as $installed) {
|
foreach (self::getInstalled() as $installed) {
|
||||||
if (!isset($installed['versions'][$packageName])) {
|
if (!isset($installed['versions'][$packageName])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($installed['versions'][$packageName]['version'])) {
|
if (!isset($installed['versions'][$packageName]['version'])) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $installed['versions'][$packageName]['version'];
|
return $installed['versions'][$packageName]['version'];
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $packageName
|
* @param string $packageName
|
||||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
||||||
*/
|
*/
|
||||||
public static function getPrettyVersion($packageName)
|
public static function getPrettyVersion($packageName)
|
||||||
{
|
{
|
||||||
foreach (self::getInstalled() as $installed) {
|
foreach (self::getInstalled() as $installed) {
|
||||||
if (!isset($installed['versions'][$packageName])) {
|
if (!isset($installed['versions'][$packageName])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
|
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $installed['versions'][$packageName]['pretty_version'];
|
return $installed['versions'][$packageName]['pretty_version'];
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $packageName
|
* @param string $packageName
|
||||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
|
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
|
||||||
*/
|
*/
|
||||||
public static function getReference($packageName)
|
public static function getReference($packageName)
|
||||||
{
|
{
|
||||||
foreach (self::getInstalled() as $installed) {
|
foreach (self::getInstalled() as $installed) {
|
||||||
if (!isset($installed['versions'][$packageName])) {
|
if (!isset($installed['versions'][$packageName])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($installed['versions'][$packageName]['reference'])) {
|
if (!isset($installed['versions'][$packageName]['reference'])) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $installed['versions'][$packageName]['reference'];
|
return $installed['versions'][$packageName]['reference'];
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $packageName
|
* @param string $packageName
|
||||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
|
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
|
||||||
*/
|
*/
|
||||||
public static function getInstallPath($packageName)
|
public static function getInstallPath($packageName)
|
||||||
{
|
{
|
||||||
foreach (self::getInstalled() as $installed) {
|
foreach (self::getInstalled() as $installed) {
|
||||||
if (!isset($installed['versions'][$packageName])) {
|
if (!isset($installed['versions'][$packageName])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
|
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
|
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
|
||||||
*/
|
*/
|
||||||
public static function getRootPackage()
|
public static function getRootPackage()
|
||||||
{
|
{
|
||||||
$installed = self::getInstalled();
|
$installed = self::getInstalled();
|
||||||
|
|
||||||
return $installed[0]['root'];
|
return $installed[0]['root'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the raw installed.php data for custom implementations
|
* Returns the raw installed.php data for custom implementations
|
||||||
*
|
*
|
||||||
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
|
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
|
||||||
* @return array[]
|
* @return array[]
|
||||||
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
|
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
|
||||||
*/
|
*/
|
||||||
public static function getRawData()
|
public static function getRawData()
|
||||||
{
|
{
|
||||||
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
|
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
|
||||||
|
|
||||||
if (null === self::$installed) {
|
if (null === self::$installed) {
|
||||||
// only require the installed.php file if this file is loaded from its dumped location,
|
// only require the installed.php file if this file is loaded from its dumped location,
|
||||||
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
||||||
if (substr(__DIR__, -8, 1) !== 'C') {
|
if (substr(__DIR__, -8, 1) !== 'C') {
|
||||||
self::$installed = include __DIR__ . '/installed.php';
|
self::$installed = include __DIR__ . '/installed.php';
|
||||||
} else {
|
} else {
|
||||||
self::$installed = array();
|
self::$installed = array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::$installed;
|
return self::$installed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
||||||
*
|
*
|
||||||
* @return array[]
|
* @return array[]
|
||||||
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||||
*/
|
*/
|
||||||
public static function getAllRawData()
|
public static function getAllRawData()
|
||||||
{
|
{
|
||||||
return self::getInstalled();
|
return self::getInstalled();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lets you reload the static array from another file
|
* Lets you reload the static array from another file
|
||||||
*
|
*
|
||||||
* This is only useful for complex integrations in which a project needs to use
|
* This is only useful for complex integrations in which a project needs to use
|
||||||
* this class but then also needs to execute another project's autoloader in process,
|
* this class but then also needs to execute another project's autoloader in process,
|
||||||
* and wants to ensure both projects have access to their version of installed.php.
|
* and wants to ensure both projects have access to their version of installed.php.
|
||||||
*
|
*
|
||||||
* A typical case would be PHPUnit, where it would need to make sure it reads all
|
* A typical case would be PHPUnit, where it would need to make sure it reads all
|
||||||
* the data it needs from this class, then call reload() with
|
* the data it needs from this class, then call reload() with
|
||||||
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
|
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
|
||||||
* the project in which it runs can then also use this class safely, without
|
* the project in which it runs can then also use this class safely, without
|
||||||
* interference between PHPUnit's dependencies and the project's dependencies.
|
* interference between PHPUnit's dependencies and the project's dependencies.
|
||||||
*
|
*
|
||||||
* @param array[] $data A vendor/composer/installed.php data set
|
* @param array[] $data A vendor/composer/installed.php data set
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
|
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
|
||||||
*/
|
*/
|
||||||
public static function reload($data)
|
public static function reload($data)
|
||||||
{
|
{
|
||||||
self::$installed = $data;
|
self::$installed = $data;
|
||||||
self::$installedByVendor = array();
|
self::$installedByVendor = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array[]
|
* @return array[]
|
||||||
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||||
*/
|
*/
|
||||||
private static function getInstalled()
|
private static function getInstalled()
|
||||||
{
|
{
|
||||||
if (null === self::$canGetVendors) {
|
if (null === self::$canGetVendors) {
|
||||||
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
|
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
|
||||||
}
|
}
|
||||||
|
|
||||||
$installed = array();
|
$installed = array();
|
||||||
|
|
||||||
if (self::$canGetVendors) {
|
if (self::$canGetVendors) {
|
||||||
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
||||||
if (isset(self::$installedByVendor[$vendorDir])) {
|
if (isset(self::$installedByVendor[$vendorDir])) {
|
||||||
$installed[] = self::$installedByVendor[$vendorDir];
|
$installed[] = self::$installedByVendor[$vendorDir];
|
||||||
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
||||||
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
|
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
|
||||||
$required = require $vendorDir.'/composer/installed.php';
|
$required = require $vendorDir.'/composer/installed.php';
|
||||||
$installed[] = self::$installedByVendor[$vendorDir] = $required;
|
$installed[] = self::$installedByVendor[$vendorDir] = $required;
|
||||||
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
|
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
|
||||||
self::$installed = $installed[count($installed) - 1];
|
self::$installed = $installed[count($installed) - 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null === self::$installed) {
|
if (null === self::$installed) {
|
||||||
// only require the installed.php file if this file is loaded from its dumped location,
|
// only require the installed.php file if this file is loaded from its dumped location,
|
||||||
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
||||||
if (substr(__DIR__, -8, 1) !== 'C') {
|
if (substr(__DIR__, -8, 1) !== 'C') {
|
||||||
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
|
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
|
||||||
$required = require __DIR__ . '/installed.php';
|
$required = require __DIR__ . '/installed.php';
|
||||||
self::$installed = $required;
|
self::$installed = $required;
|
||||||
} else {
|
} else {
|
||||||
self::$installed = array();
|
self::$installed = array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self::$installed !== array()) {
|
if (self::$installed !== array()) {
|
||||||
$installed[] = self::$installed;
|
$installed[] = self::$installed;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $installed;
|
return $installed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
|
|
||||||
Copyright (c) Nils Adermann, Jordi Boggiano
|
Copyright (c) Nils Adermann, Jordi Boggiano
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
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
|
copies of the Software, and to permit persons to whom the Software is furnished
|
||||||
to do so, subject to the following conditions:
|
to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
The above copyright notice and this permission notice shall be included in all
|
||||||
copies or substantial portions of the Software.
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// autoload_classmap.php @generated by Composer
|
// autoload_classmap.php @generated by Composer
|
||||||
|
|
||||||
$vendorDir = dirname(__DIR__);
|
$vendorDir = dirname(__DIR__);
|
||||||
$baseDir = dirname($vendorDir);
|
$baseDir = dirname($vendorDir);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'AltoRouter' => $vendorDir . '/altorouter/altorouter/AltoRouter.php',
|
'AltoRouter' => $vendorDir . '/altorouter/altorouter/AltoRouter.php',
|
||||||
'CURLStringFile' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php',
|
'CURLStringFile' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php',
|
||||||
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
||||||
'ReturnTypeWillChange' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php',
|
'ReturnTypeWillChange' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php',
|
||||||
);
|
);
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// autoload_files.php @generated by Composer
|
// autoload_files.php @generated by Composer
|
||||||
|
|
||||||
$vendorDir = dirname(__DIR__);
|
$vendorDir = dirname(__DIR__);
|
||||||
$baseDir = dirname($vendorDir);
|
$baseDir = dirname($vendorDir);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
|
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
|
||||||
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
|
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
|
||||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
|
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
|
||||||
'23c18046f52bef3eea034657bafda50f' => $vendorDir . '/symfony/polyfill-php81/bootstrap.php',
|
'23c18046f52bef3eea034657bafda50f' => $vendorDir . '/symfony/polyfill-php81/bootstrap.php',
|
||||||
'89efb1254ef2d1c5d80096acd12c4098' => $vendorDir . '/twig/twig/src/Resources/core.php',
|
'89efb1254ef2d1c5d80096acd12c4098' => $vendorDir . '/twig/twig/src/Resources/core.php',
|
||||||
'ffecb95d45175fd40f75be8a23b34f90' => $vendorDir . '/twig/twig/src/Resources/debug.php',
|
'ffecb95d45175fd40f75be8a23b34f90' => $vendorDir . '/twig/twig/src/Resources/debug.php',
|
||||||
'c7baa00073ee9c61edf148c51917cfb4' => $vendorDir . '/twig/twig/src/Resources/escaper.php',
|
'c7baa00073ee9c61edf148c51917cfb4' => $vendorDir . '/twig/twig/src/Resources/escaper.php',
|
||||||
'f844ccf1d25df8663951193c3fc307c8' => $vendorDir . '/twig/twig/src/Resources/string_loader.php',
|
'f844ccf1d25df8663951193c3fc307c8' => $vendorDir . '/twig/twig/src/Resources/string_loader.php',
|
||||||
);
|
);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// autoload_namespaces.php @generated by Composer
|
// autoload_namespaces.php @generated by Composer
|
||||||
|
|
||||||
$vendorDir = dirname(__DIR__);
|
$vendorDir = dirname(__DIR__);
|
||||||
$baseDir = dirname($vendorDir);
|
$baseDir = dirname($vendorDir);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
);
|
);
|
||||||
|