Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
docs: all PHPDocs are in english
Browse files Browse the repository at this point in the history
v2.1.1-AR
  • Loading branch information
Anhgelus committed Aug 29, 2021
1 parent 5da7a45 commit 459a69f
Showing 1 changed file with 28 additions and 20 deletions.
48 changes: 28 additions & 20 deletions class/Rooter/Rooter.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct(string $uri)
}

/**
* Root vers la bonne page
* Root to the right page
* @return string La page
*/
public function root(): string
Expand Down Expand Up @@ -57,9 +57,9 @@ public function root(): string

}
/**
* Récupère le titre de la page
* Get the page's title
*
* @return string Titre de la page
* @return string Page's title
*/
public function getPageTitle(): string
{
Expand Down Expand Up @@ -89,9 +89,9 @@ public function getPageTitle(): string
}

/**
* Récupère la description de la page
* Get the page's description
*
* @return string Description de la page
* @return string Page's description
*/
public function getPageDesc(): string
{
Expand All @@ -108,45 +108,53 @@ public function getPageDesc(): string
}

/**
* @param string $siteName Nom du site
* Set the website name
*
* @param string $siteName website Name
*/
public function setSiteName(string $siteName): void
{
$this->siteName = $siteName;
}

/**
* Remap to the right page
*
* @param string $uri Uri (ex: '/', '/news', '/video?id=16a', etc)
* @param string $link Lien vers la page ('video.php', 'test/test2.php', etc)
* @param string $link New link to the page ('video.php', 'test/test2.php', etc)
*/
public function map(string $uri, string $link):void
{
$this->mapUri[$uri] = $link;
}

/**
* Modify the title of a specific page
*
* @param string $uri Uri (ex: '/', '/news', '/video?id=16a', etc)
* @param string $title Titre de la page ('Home Page', 'Just Video', etc)
* @param string $title New page's title ('Home Page', 'Just Video', etc)
*/
public function mapTitle(string $uri, string $title):void
{
$this->mapTitle[$uri] = $title;
}

/**
* Add page's description
*
* @param string $uri Uri (ex: '/', '/news', '/video?id=16a', etc)
* @param string $desc Description de la page ("Video page, it's just that lmao", 'You can use the simple quote with \'it\s\' if you want')
* @param string $desc New page's description ("Video page, it's just that lmao", 'You can use the simple quote with \'it\s\' if you want')
*/
public function mapDesc(string $uri, string $desc):void
{
$this->mapDesc[$uri] = $desc;
}

/**
* Informe si le fichier portant ce nom existe
* Informs if the file with this name exists
*
* @param mixed $uri Uri (ex: '/', '/hey', etc)
* @return bool True = fichier existe ; False = n'existe pas
* @param string $uri Uri (ex: '/', '/hey', etc)
* @return bool true = file existe ; false = file doesn't existe
*/
private function doesItExist(string $uri): bool
{
Expand All @@ -166,21 +174,21 @@ private function doesItExist(string $uri): bool
}

/**
* Transforme la fin du fichier
* Transform the end to add the name of the website
*
* @param mixed $base Base à transformer
* @return string Base transformée
* @param mixed $base Base to be transformed
* @return string Base transformed
*/
private function transformEnd(string $base): string
{
return $base . ' | ' . $this->siteName;
}

/**
* Détecte et renvoie le nom du fichier originel lors de l'utilisation de GET dans un formulaire
* Detects and returns the original file name when using GET in a form
*
* @param mixed $uri Uri (ex: '/', '/hey?lul=yes', etc)
* @return string Nom du fichier ; False = fichier inexistant
* @return string File's name ; False = file doesn't exist
*/
private function detectorGetForm(string $uri): string
{
Expand All @@ -192,11 +200,11 @@ private function detectorGetForm(string $uri): string
}

/**
* Détecte s'il y a l'utilisation de GET dans le lien $uri
* Detects if there is use of GET in the $uri link
*
* @param array $mapTitle Array défini par $this->mapTitle()
* @param array $mapTitle Array defined by $this->mapTitle()
* @param string $uri Uri (ex: '/', '/news', '/video?id=16a', etc)
* @return bool true = utilise GET | false = n'utilise pas GET
* @return bool true = use GET | false = doesn't use GET
*/
private function detectGetIntoMap(array $mapTitle, string $uri): bool
{
Expand Down

0 comments on commit 459a69f

Please sign in to comment.