- [x] [view/][view] Ajout de "use CLASS;"

This commit is contained in:
xdrm-brackets 2016-02-13 18:47:20 +01:00
parent 89c1420f62
commit eed21581ef
11 changed files with 65 additions and 51 deletions

View File

@ -1,8 +1,6 @@
<?php <?php
namespace manager; namespace manager;
use \manager\ManagerError;
use \manager\ResourceDispatcher;
class DataBase{ class DataBase{

View File

@ -1,7 +1,6 @@
<?php <?php
namespace manager; namespace manager;
use \manager\ManagerError;
// FORMAT: // FORMAT:

View File

@ -1,9 +1,6 @@
<?php <?php
namespace manager; namespace manager;
use \manager\ModuleAnswer;
use \manager\ManagerError;
use \manager\ResourceDispatcher;
// FORMAT: // FORMAT:
// //

View File

@ -39,6 +39,7 @@
######## ########
# FAIT # # FAIT #
######## ########
- [x] [view/][view] Ajout de "use CLASS;"
- [x] Ajout de "use CLASS;" dans les fichiers pour simplifier la lisibilite - [x] Ajout de "use CLASS;" dans les fichiers pour simplifier la lisibilite
- [x] [phpunit/sessionManager] test unitaires du manager de session php - [x] [phpunit/sessionManager] test unitaires du manager de session php
- [x] [ModuleAnswer] Gestion des erreurs au niveau interne des Modules - [x] [ModuleAnswer] Gestion des erreurs au niveau interne des Modules

View File

@ -1,3 +1,4 @@
<?php use \manager\ResourceDispatcher; ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -42,15 +43,15 @@
<!-- MENU DE LA PAGE --> <!-- MENU DE LA PAGE -->
<nav id='MENU-SIDE'> <nav id='MENU-SIDE'>
<span data-link='profile' data-desc='Profil' class='mb' ><?php echo \manager\ResourceDispatcher::getResource('f/svg/dashboard/st/menu-side'); ?></span> <span data-link='profile' data-desc='Profil' class='mb' ><?php echo ResourceDispatcher::getResource('f/svg/dashboard/st/menu-side'); ?></span>
<span data-link='dashboard' data-desc='Tableau de bord' class='apart' ><?php echo \manager\ResourceDispatcher::getResource('f/svg/dashboard/st/menu-side'); ?></span> <span data-link='dashboard' data-desc='Tableau de bord' class='apart' ><?php echo ResourceDispatcher::getResource('f/svg/dashboard/st/menu-side'); ?></span>
<span data-link='machines' data-desc='Véhicules' ><?php echo \manager\ResourceDispatcher::getResource('f/svg/machines/st/menu-side' ); ?></span> <span data-link='machines' data-desc='Véhicules' ><?php echo ResourceDispatcher::getResource('f/svg/machines/st/menu-side' ); ?></span>
<span data-link='users' data-desc='Utilisateurs' ><?php echo \manager\ResourceDispatcher::getResource('f/svg/users/st/menu-side' ); ?></span> <span data-link='users' data-desc='Utilisateurs' ><?php echo ResourceDispatcher::getResource('f/svg/users/st/menu-side' ); ?></span>
<span data-link='analytics' data-desc='Statistiques et suivi' ><?php echo \manager\ResourceDispatcher::getResource('f/svg/analytics/st/menu-side'); ?></span> <span data-link='analytics' data-desc='Statistiques et suivi' ><?php echo ResourceDispatcher::getResource('f/svg/analytics/st/menu-side'); ?></span>
<span data-link='settings' data-desc='Paramètres' class='mt' ><?php echo \manager\ResourceDispatcher::getResource('f/svg/settings/st/menu-side' ); ?></span> <span data-link='settings' data-desc='Paramètres' class='mt' ><?php echo ResourceDispatcher::getResource('f/svg/settings/st/menu-side' ); ?></span>
</nav> </nav>

View File

@ -1,5 +1,8 @@
<?php define('__ROOT__', dirname(dirname(__FILE__)) ); <?php define('__ROOT__', dirname(dirname(__FILE__)) );
require_once __ROOT__.'/manager/autoloader.php'; require_once __ROOT__.'/manager/autoloader.php';
use \manager\ModuleRequest;
use \manager\ManagerError;
use \manager\ResourceDispatcher;
?> ?>
@ -7,22 +10,22 @@
<nav class='sub-menu-side'> <nav class='sub-menu-side'>
<span data-sublink='analytics'> <span data-sublink='analytics'>
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/analytics/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/analytics/st/sub-menu-side' ); ?></span>
<span>Statistiques</span> <span>Statistiques</span>
</span> </span>
<span data-sublink='view' > <span data-sublink='view' >
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/view/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/view/st/sub-menu-side' ); ?></span>
<span>Consulter le suivi</span> <span>Consulter le suivi</span>
</span> </span>
<span data-sublink='start' > <span data-sublink='start' >
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/sync/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/sync/st/sub-menu-side' ); ?></span>
<span>Demarrer un suivi</span> <span>Demarrer un suivi</span>
</span> </span>
<span data-sublink='search' > <span data-sublink='search' >
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/search/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/search/st/sub-menu-side' ); ?></span>
<span>Recherche</span> <span>Recherche</span>
</span> </span>

View File

@ -1,27 +1,30 @@
<?php define('__ROOT__', dirname(dirname(__FILE__)) ); <?php define('__ROOT__', dirname(dirname(__FILE__)) );
require_once __ROOT__.'/manager/autoloader.php'; require_once __ROOT__.'/manager/autoloader.php';
use \manager\ModuleRequest;
use \manager\ManagerError;
use \manager\ResourceDispatcher;
?> ?>
<!-- [1] Gestion du sous-menu de gauche --> <!-- [1] Gestion du sous-menu de gauche -->
<nav class='sub-menu-side'> <nav class='sub-menu-side'>
<span data-sublink='displayall'> <span data-sublink='displayall'>
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/view/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/view/st/sub-menu-side' ); ?></span>
<span>Tout afficher</span> <span>Tout afficher</span>
</span> </span>
<span data-sublink='filter' > <span data-sublink='filter' >
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/filter/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/filter/st/sub-menu-side' ); ?></span>
<span>Filtrer</span> <span>Filtrer</span>
</span> </span>
<span data-sublink='search' > <span data-sublink='search' >
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/search/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/search/st/sub-menu-side' ); ?></span>
<span>Recherche</span> <span>Recherche</span>
</span> </span>
<span data-sublink='remove' > <span data-sublink='remove' >
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/remove/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/remove/st/sub-menu-side' ); ?></span>
<span>Vider l'historique</span> <span>Vider l'historique</span>
</span> </span>
</nav> </nav>

View File

@ -1,37 +1,40 @@
<?php define('__ROOT__', dirname(dirname(__FILE__)) ); <?php define('__ROOT__', dirname(dirname(__FILE__)) );
require_once __ROOT__.'/manager/autoloader.php'; require_once __ROOT__.'/manager/autoloader.php';
use \manager\ModuleRequest;
use \manager\ManagerError;
use \manager\ResourceDispatcher;
?> ?>
<!-- [1] Gestion du sous-menu de gauche --> <!-- [1] Gestion du sous-menu de gauche -->
<nav class='sub-menu-side'> <nav class='sub-menu-side'>
<span data-sublink='view'> <span data-sublink='view'>
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/view/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/view/st/sub-menu-side' ); ?></span>
<span>Tout afficher</span> <span>Tout afficher</span>
</span> </span>
<span data-sublink='create'> <span data-sublink='create'>
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/create/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/create/st/sub-menu-side' ); ?></span>
<span>Creation</span> <span>Creation</span>
</span> </span>
<span data-sublink='remove'> <span data-sublink='remove'>
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/remove/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/remove/st/sub-menu-side' ); ?></span>
<span>Suppression</span> <span>Suppression</span>
</span> </span>
<span data-sublink='edit'> <span data-sublink='edit'>
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/edit/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/edit/st/sub-menu-side' ); ?></span>
<span>Modification</span> <span>Modification</span>
</span> </span>
<span data-sublink='filter'> <span data-sublink='filter'>
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/filter/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/filter/st/sub-menu-side' ); ?></span>
<span>Filtrer</span> <span>Filtrer</span>
</span> </span>
<span data-sublink='search'> <span data-sublink='search'>
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/search/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/search/st/sub-menu-side' ); ?></span>
<span>Recherche</span> <span>Recherche</span>
</span> </span>
@ -52,15 +55,15 @@
// On recupere toutes les machines // On recupere toutes les machines
debug(); debug();
$request = new \manager\ModuleRequest('machineDefault/getAll'); // On utilise la methode 'getAll' du module 'machineDefault' $request = new ModuleRequest('machineDefault/getAll'); // On utilise la methode 'getAll' du module 'machineDefault'
$answer = $request->dispatch(); // On recupere la reponse $answer = $request->dispatch(); // On recupere la reponse
echo "<section data-sublink='view' class='list'>"; echo "<section data-sublink='view' class='list'>";
// echo 'Liste des utilisateurs: <br>'; // echo 'Liste des utilisateurs: <br>';
// si erreur, on affiche l'explicitation // si erreur, on affiche l'explicitation
if( $answer->error != \manager\ManagerError::Success ) if( $answer->error != ManagerError::Success )
var_dump( \manager\ManagerError::explicit($answer->error) ); var_dump( ManagerError::explicit($answer->error) );
// Si aucune erreur, on affiche les resultats // Si aucune erreur, on affiche les resultats
else{ else{
@ -71,7 +74,7 @@
// Code RFID // Code RFID
echo "<span class='code'>"; echo "<span class='code'>";
echo \manager\ResourceDispatcher::getResource('f/svg/card/st/container'); echo ResourceDispatcher::getResource('f/svg/card/st/container');
echo "<span>"; echo "<span>";
echo $machine['code']; echo $machine['code'];
@ -80,7 +83,7 @@
// Groupes de la machine // Groupes de la machine
echo "<span class='groups'>"; echo "<span class='groups'>";
echo \manager\ResourceDispatcher::getResource('f/svg/group/st/container'); echo ResourceDispatcher::getResource('f/svg/group/st/container');
echo "<span>a</span>"; echo "<span>a</span>";
echo "<span>a</span>"; echo "<span>a</span>";

View File

@ -1,5 +1,8 @@
<?php define('__ROOT__', dirname(dirname(__FILE__)) ); <?php define('__ROOT__', dirname(dirname(__FILE__)) );
require_once __ROOT__.'/manager/autoloader.php'; require_once __ROOT__.'/manager/autoloader.php';
use \manager\ModuleRequest;
use \manager\ManagerError;
use \manager\ResourceDispatcher;
?> ?>
@ -7,12 +10,12 @@
<nav class='sub-menu-side'> <nav class='sub-menu-side'>
<span data-sublink='view'> <span data-sublink='view'>
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/view/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/view/st/sub-menu-side' ); ?></span>
<span>Mon Profil</span> <span>Mon Profil</span>
</span> </span>
<span data-sublink='password'> <span data-sublink='password'>
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/password/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/password/st/sub-menu-side' ); ?></span>
<span>Mot de passe</span> <span>Mot de passe</span>
</span> </span>

View File

@ -1,37 +1,40 @@
<?php define('__ROOT__', dirname(dirname(__FILE__)) ); <?php define('__ROOT__', dirname(dirname(__FILE__)) );
require_once __ROOT__.'/manager/autoloader.php'; require_once __ROOT__.'/manager/autoloader.php';
use \manager\ModuleRequest;
use \manager\ManagerError;
use \manager\ResourceDispatcher;
?> ?>
<!-- [1] Gestion du sous-menu de gauche --> <!-- [1] Gestion du sous-menu de gauche -->
<nav class='sub-menu-side'> <nav class='sub-menu-side'>
<span data-sublink='displayall'> <span data-sublink='displayall'>
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/view/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/view/st/sub-menu-side' ); ?></span>
<span>Tout afficher</span> <span>Tout afficher</span>
</span> </span>
<span data-sublink='create' > <span data-sublink='create' >
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/create/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/create/st/sub-menu-side' ); ?></span>
<span>Creation</span> <span>Creation</span>
</span> </span>
<span data-sublink='remove' > <span data-sublink='remove' >
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/remove/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/remove/st/sub-menu-side' ); ?></span>
<span>Suppression</span> <span>Suppression</span>
</span> </span>
<span data-sublink='edit' > <span data-sublink='edit' >
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/edit/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/edit/st/sub-menu-side' ); ?></span>
<span>Modification</span> <span>Modification</span>
</span> </span>
<span data-sublink='filter' > <span data-sublink='filter' >
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/filter/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/filter/st/sub-menu-side' ); ?></span>
<span>Filtrer</span> <span>Filtrer</span>
</span> </span>
<span data-sublink='search' > <span data-sublink='search' >
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/search/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/search/st/sub-menu-side' ); ?></span>
<span>Recherche</span> <span>Recherche</span>
</span> </span>

View File

@ -1,37 +1,40 @@
<?php define('__ROOT__', dirname(dirname(__FILE__)) ); <?php define('__ROOT__', dirname(dirname(__FILE__)) );
require_once __ROOT__.'/manager/autoloader.php'; require_once __ROOT__.'/manager/autoloader.php';
use \manager\ModuleRequest;
use \manager\ManagerError;
use \manager\ResourceDispatcher;
?> ?>
<!-- [1] Gestion du sous-menu de gauche --> <!-- [1] Gestion du sous-menu de gauche -->
<nav class='sub-menu-side'> <nav class='sub-menu-side'>
<span data-sublink='view'> <span data-sublink='view'>
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/view/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/view/st/sub-menu-side' ); ?></span>
<span>Tout afficher</span> <span>Tout afficher</span>
</span> </span>
<span data-sublink='create' > <span data-sublink='create' >
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/create/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/create/st/sub-menu-side' ); ?></span>
<span>Creation</span> <span>Creation</span>
</span> </span>
<span data-sublink='remove' > <span data-sublink='remove' >
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/remove/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/remove/st/sub-menu-side' ); ?></span>
<span>Suppression</span> <span>Suppression</span>
</span> </span>
<span data-sublink='edit' > <span data-sublink='edit' >
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/edit/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/edit/st/sub-menu-side' ); ?></span>
<span>Modification</span> <span>Modification</span>
</span> </span>
<span data-sublink='filter' > <span data-sublink='filter' >
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/filter/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/filter/st/sub-menu-side' ); ?></span>
<span>Filtrer</span> <span>Filtrer</span>
</span> </span>
<span data-sublink='search' > <span data-sublink='search' >
<span class='svg'><?php echo \manager\ResourceDispatcher::getResource( 'f/svg/search/st/sub-menu-side' ); ?></span> <span class='svg'><?php echo ResourceDispatcher::getResource( 'f/svg/search/st/sub-menu-side' ); ?></span>
<span>Recherche</span> <span>Recherche</span>
</span> </span>
@ -57,15 +60,15 @@
// On recupere tous les utilisateurs // On recupere tous les utilisateurs
debug(); debug();
$request = new \manager\ModuleRequest('userDefault/getAll'); // On utilise la methode 'getAll' du module 'userDefault' $request = new ModuleRequest('userDefault/getAll'); // On utilise la methode 'getAll' du module 'userDefault'
$answer = $request->dispatch(); // On recupere la reponse $answer = $request->dispatch(); // On recupere la reponse
echo "<section data-sublink='view' class='list'>"; echo "<section data-sublink='view' class='list'>";
// echo 'Liste des utilisateurs: <br>'; // echo 'Liste des utilisateurs: <br>';
// si erreur, on affiche l'explicitation // si erreur, on affiche l'explicitation
if( $answer->error != \manager\ManagerError::Success ) if( $answer->error != ManagerError::Success )
var_dump( \manager\ManagerError::explicit($answer->error) ); var_dump( ManagerError::explicit($answer->error) );
// Si aucune erreur, on affiche les resultats // Si aucune erreur, on affiche les resultats
else{ else{
@ -76,7 +79,7 @@
// Code RFID // Code RFID
echo "<span class='code'>"; echo "<span class='code'>";
echo \manager\ResourceDispatcher::getResource('f/svg/card/st/container'); echo ResourceDispatcher::getResource('f/svg/card/st/container');
echo "<span>"; echo "<span>";
echo $user['code']; echo $user['code'];
@ -85,7 +88,7 @@
// Adresse email // Adresse email
echo "<span class='mail'>"; echo "<span class='mail'>";
echo \manager\ResourceDispatcher::getResource('f/svg/mail/st/container'); echo ResourceDispatcher::getResource('f/svg/mail/st/container');
echo "<span>"; echo "<span>";
echo $user['mail']; echo $user['mail'];
@ -94,7 +97,7 @@
// Groupes de la machine // Groupes de la machine
echo "<span class='groups'>"; echo "<span class='groups'>";
echo \manager\ResourceDispatcher::getResource('f/svg/group/st/container'); echo ResourceDispatcher::getResource('f/svg/group/st/container');
echo "<span>a</span>"; echo "<span>a</span>";
echo "<span>a</span>"; echo "<span>a</span>";