ManagerError devient un module
This commit is contained in:
parent
2cf46983a3
commit
bb54056069
|
@ -3,7 +3,7 @@
|
||||||
namespace api\core;
|
namespace api\core;
|
||||||
use \database\core\Database;
|
use \database\core\Database;
|
||||||
use \api\core\Authentification;
|
use \api\core\Authentification;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
|
|
||||||
|
|
||||||
class ModuleRequest{
|
class ModuleRequest{
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
public function __construct($path=null, $params=null){
|
public function __construct($path=null, $params=null){
|
||||||
// Si pas parametre manquant, on quitte
|
// Si pas parametre manquant, on quitte
|
||||||
if( $path == null ){
|
if( $path == null ){
|
||||||
$this->error = ManagerError::MissingPath;
|
$this->error = Error::MissingPath;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
// Gestion de l'erreur de parsage
|
// Gestion de l'erreur de parsage
|
||||||
if( $this->modules == null ){
|
if( $this->modules == null ){
|
||||||
$this->error = ManagerError::ParsingFailed;
|
$this->error = Error::ParsingFailed;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
// Type de @path
|
// Type de @path
|
||||||
if( !is_string($path) ){ // Si le type est incorrect
|
if( !is_string($path) ){ // Si le type est incorrect
|
||||||
$this->error = ManagerError::WrongPathModule;
|
$this->error = Error::WrongPathModule;
|
||||||
return false; // On retourne FALSE, si erreur
|
return false; // On retourne FALSE, si erreur
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
/* [4] Verification des parametres (si @type est defini)
|
/* [4] Verification des parametres (si @type est defini)
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
if( !$this->checkParams($params) ){ // Verification de tous les types
|
if( !$this->checkParams($params) ){ // Verification de tous les types
|
||||||
$this->error = ManagerError::ParamError;
|
$this->error = Error::ParamError;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
/* [6] Construction de l'objet
|
/* [6] Construction de l'objet
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
$this->params = $params;
|
$this->params = $params;
|
||||||
$this->error = ManagerError::Success;
|
$this->error = Error::Success;
|
||||||
|
|
||||||
return true; // On retourne que tout s'est bien passe
|
return true; // On retourne que tout s'est bien passe
|
||||||
|
|
||||||
|
@ -119,14 +119,14 @@
|
||||||
|
|
||||||
/* [1] On verifie qu'aucune erreur n'a ete signalee
|
/* [1] On verifie qu'aucune erreur n'a ete signalee
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
if( $this->error != ManagerError::Success ) // si il y a une erreur
|
if( $this->error != Error::Success ) // si il y a une erreur
|
||||||
return new ModuleResponse($this->error); // on la passe a la reponse
|
return new ModuleResponse($this->error); // on la passe a la reponse
|
||||||
|
|
||||||
|
|
||||||
/* [2] On verifie que la methode est amorcable
|
/* [2] On verifie que la methode est amorcable
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
if( !is_callable($this->getFunctionCaller()) ){
|
if( !is_callable($this->getFunctionCaller()) ){
|
||||||
$this->error = ManagerError::UncallableMethod;
|
$this->error = Error::UncallableMethod;
|
||||||
return new ModuleResponse($this->error);
|
return new ModuleResponse($this->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,14 +158,14 @@
|
||||||
public function download(){
|
public function download(){
|
||||||
/* [1] On verifie qu'aucune erreur n'a ete signalee
|
/* [1] On verifie qu'aucune erreur n'a ete signalee
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
if( $this->error != ManagerError::Success ) // si il y a une erreur
|
if( $this->error != Error::Success ) // si il y a une erreur
|
||||||
return new ModuleResponse($this->error); // on la passe a la reponse
|
return new ModuleResponse($this->error); // on la passe a la reponse
|
||||||
|
|
||||||
|
|
||||||
/* [2] On verifie que la methode est amorcable
|
/* [2] On verifie que la methode est amorcable
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
if( !is_callable($this->getFunctionCaller()) ){
|
if( !is_callable($this->getFunctionCaller()) ){
|
||||||
$this->error = ManagerError::UncallableMethod;
|
$this->error = Error::UncallableMethod;
|
||||||
return new ModuleResponse($this->error);
|
return new ModuleResponse($this->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,14 +178,14 @@
|
||||||
/* [4] Vérification des erreurs et paramètres
|
/* [4] Vérification des erreurs et paramètres
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
/* (1) Vérification de l'erreur retournée, si pas Success, on retourne l'erreur */
|
/* (1) Vérification de l'erreur retournée, si pas Success, on retourne l'erreur */
|
||||||
if( isset($returned['ModuleError']) && $returned['ModuleError'] != ManagerError::Success ){
|
if( isset($returned['ModuleError']) && $returned['ModuleError'] != Error::Success ){
|
||||||
$this->error = $returned['ModuleError'];
|
$this->error = $returned['ModuleError'];
|
||||||
return new ModuleResponse($this->error);
|
return new ModuleResponse($this->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (2) Vérification du contenu, si pas défini */
|
/* (2) Vérification du contenu, si pas défini */
|
||||||
if( !isset($returned['body']) ){
|
if( !isset($returned['body']) ){
|
||||||
$this->error = ManagerError::ParamError;
|
$this->error = Error::ParamError;
|
||||||
return new ModuleResponse($this->error);
|
return new ModuleResponse($this->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@
|
||||||
fclose($tmpfile);
|
fclose($tmpfile);
|
||||||
chmod($tmpfnameroot, 0775);
|
chmod($tmpfnameroot, 0775);
|
||||||
|
|
||||||
$response = new ModuleResponse(ManagerError::Success);
|
$response = new ModuleResponse(Error::Success);
|
||||||
$response->append('link', $tmpfname);
|
$response->append('link', $tmpfname);
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
|
@ -317,7 +317,7 @@
|
||||||
/* [1] Verification format general
|
/* [1] Verification format general
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
if( !preg_match('#^([\w_-]+)/([\w_-]+)$#i', $path, $matches) ){ // Si mauvais format
|
if( !preg_match('#^([\w_-]+)/([\w_-]+)$#i', $path, $matches) ){ // Si mauvais format
|
||||||
$this->error = ManagerError::WrongPathModule;
|
$this->error = Error::WrongPathModule;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@
|
||||||
/* [2] Verification de l'existence du module (conf)
|
/* [2] Verification de l'existence du module (conf)
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
if( !array_key_exists($module, $this->modules) ){ // Si le module n'est pas specifie dans la conf
|
if( !array_key_exists($module, $this->modules) ){ // Si le module n'est pas specifie dans la conf
|
||||||
$this->error = ManagerError::UnknownModule;
|
$this->error = Error::UnknownModule;
|
||||||
return false; // On retourne FALSE, si erreur
|
return false; // On retourne FALSE, si erreur
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,7 +337,7 @@
|
||||||
/* [3] Verification de l'existence de la methode (conf)
|
/* [3] Verification de l'existence de la methode (conf)
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
if( array_key_exists($method, $this->modules[$module]) === false ){ // Si la methode n'est pas specifie dans la conf
|
if( array_key_exists($method, $this->modules[$module]) === false ){ // Si la methode n'est pas specifie dans la conf
|
||||||
$this->error = ManagerError::UnknownMethod;
|
$this->error = Error::UnknownMethod;
|
||||||
return false; // On retourne FALSE, si erreur
|
return false; // On retourne FALSE, si erreur
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -380,7 +380,7 @@
|
||||||
|
|
||||||
/* (1) On retourne FAUX si aucun droit n'a ete trouve */
|
/* (1) On retourne FAUX si aucun droit n'a ete trouve */
|
||||||
if( !$granted ){
|
if( !$granted ){
|
||||||
$this->error = ManagerError::PermissionError;
|
$this->error = Error::PermissionError;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -399,7 +399,7 @@
|
||||||
|
|
||||||
/* (3) Si aucune autorisation et pas module "Default" */
|
/* (3) Si aucune autorisation et pas module "Default" */
|
||||||
if( !$allowedModule && !$defaultModule ){
|
if( !$allowedModule && !$defaultModule ){
|
||||||
$this->error = ManagerError::DisabledModule;
|
$this->error = Error::DisabledModule;
|
||||||
return false; // On retourne FALSE, si erreur
|
return false; // On retourne FALSE, si erreur
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace api\core;
|
namespace api\core;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
|
|
||||||
|
|
||||||
// FORMAT:
|
// FORMAT:
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
* @error<ModuleError> Erreur passee par la requete (si existe)
|
* @error<ModuleError> Erreur passee par la requete (si existe)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function __construct($error=ManagerError::Success){
|
public function __construct($error=Error::Success){
|
||||||
$this->data = [];
|
$this->data = [];
|
||||||
$this->error = $error;
|
$this->error = $error;
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
public function serialize(){
|
public function serialize(){
|
||||||
|
|
||||||
// Code Http
|
// Code Http
|
||||||
ManagerError::setHttpCode($this->error);
|
Error::setHttpCode($this->error);
|
||||||
|
|
||||||
// Type de contenu
|
// Type de contenu
|
||||||
// header('Content-Type: application/json; charset=utf-8');
|
// header('Content-Type: application/json; charset=utf-8');
|
||||||
|
@ -146,7 +146,7 @@
|
||||||
// On rajoute l'erreur au message
|
// On rajoute l'erreur au message
|
||||||
$returnData = array_merge([
|
$returnData = array_merge([
|
||||||
'ModuleError' => $this->error,
|
'ModuleError' => $this->error,
|
||||||
'ErrorDescription' => ManagerError::explicit($this->error)
|
'ErrorDescription' => Error::explicit($this->error)
|
||||||
],
|
],
|
||||||
$this->data
|
$this->data
|
||||||
);
|
);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
use \database\core\Database;
|
use \database\core\Database;
|
||||||
use \manager\sessionManager;
|
use \manager\sessionManager;
|
||||||
use \api\core\Authentification;
|
use \api\core\Authentification;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \database\core\Repo;
|
use \database\core\Repo;
|
||||||
use \manager\repo\cluster as clusterRepo;
|
use \manager\repo\cluster as clusterRepo;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
use \viewer\core\Viewer;
|
use \viewer\core\Viewer;
|
||||||
use \database\core\Database;
|
use \database\core\Database;
|
||||||
use \manager\sessionManager;
|
use \manager\sessionManager;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \database\core\Repo;
|
use \database\core\Repo;
|
||||||
use \manager\repo\cluster as clusterRepo;
|
use \manager\repo\cluster as clusterRepo;
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
// Si une erreur est retournee, on retourne une erreur
|
// Si une erreur est retournee, on retourne une erreur
|
||||||
if( $id_cluster === false )
|
if( $id_cluster === false )
|
||||||
return ['ModuleError' => ManagerError::ModuleError];
|
return ['ModuleError' => Error::ModuleError];
|
||||||
|
|
||||||
|
|
||||||
/* [5] Gestion du retour
|
/* [5] Gestion du retour
|
||||||
|
@ -158,7 +158,7 @@
|
||||||
|
|
||||||
// Si aucun resultat, on retourne une erreur
|
// Si aucun resultat, on retourne une erreur
|
||||||
if( $answer === false )
|
if( $answer === false )
|
||||||
return [ 'ModuleError' => ManagerError::NoMatchFound ];
|
return [ 'ModuleError' => Error::NoMatchFound ];
|
||||||
|
|
||||||
|
|
||||||
return [ 'cluster' => $answer ];
|
return [ 'cluster' => $answer ];
|
||||||
|
@ -190,7 +190,7 @@
|
||||||
|
|
||||||
// Si aucun resultat, on retourne une erreur
|
// Si aucun resultat, on retourne une erreur
|
||||||
if( $answer === false )
|
if( $answer === false )
|
||||||
return [ 'ModuleError' => ManagerError::NoMatchFound ];
|
return [ 'ModuleError' => Error::NoMatchFound ];
|
||||||
|
|
||||||
|
|
||||||
return [ 'cluster' => $answer ];
|
return [ 'cluster' => $answer ];
|
||||||
|
@ -222,7 +222,7 @@
|
||||||
|
|
||||||
// Si aucun resultat, on retourne une erreur
|
// Si aucun resultat, on retourne une erreur
|
||||||
if( $answer === false )
|
if( $answer === false )
|
||||||
return [ 'ModuleError' => ManagerError::NoMatchFound ];
|
return [ 'ModuleError' => Error::NoMatchFound ];
|
||||||
|
|
||||||
|
|
||||||
return [ 'members' => $answer ];
|
return [ 'members' => $answer ];
|
||||||
|
@ -257,7 +257,7 @@
|
||||||
|
|
||||||
// Si on a recupere aucun utilisateur, on retourne une erreur
|
// Si on a recupere aucun utilisateur, on retourne une erreur
|
||||||
if( $cluster_data === false )
|
if( $cluster_data === false )
|
||||||
return ['ModuleError' => ManagerError::NoMatchFound];
|
return ['ModuleError' => Error::NoMatchFound];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
namespace api\module;
|
namespace api\module;
|
||||||
use \database\core\Database;
|
use \database\core\Database;
|
||||||
use \manager\sessionManager;
|
use \manager\sessionManager;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \database\core\Repo;
|
use \database\core\Repo;
|
||||||
use \manager\repo\cluster as clusterRepo;
|
use \manager\repo\cluster as clusterRepo;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
// Si une erreur est retournee, on retourne une erreur
|
// Si une erreur est retournee, on retourne une erreur
|
||||||
if( $id_machine === false )
|
if( $id_machine === false )
|
||||||
return ['ModuleError' => ManagerError::ModuleError];
|
return ['ModuleError' => Error::ModuleError];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
|
|
||||||
// Si aucun resultat, on retourne une erreur
|
// Si aucun resultat, on retourne une erreur
|
||||||
if( $answer === false )
|
if( $answer === false )
|
||||||
return [ 'ModuleError' => ManagerError::NoMatchFound ];
|
return [ 'ModuleError' => Error::NoMatchFound ];
|
||||||
|
|
||||||
|
|
||||||
return [ 'machine' => $answer ];
|
return [ 'machine' => $answer ];
|
||||||
|
@ -187,7 +187,7 @@
|
||||||
|
|
||||||
// Si aucun resultat, on retourne une erreur
|
// Si aucun resultat, on retourne une erreur
|
||||||
if( $answer === false )
|
if( $answer === false )
|
||||||
return [ 'ModuleError' => ManagerError::NoMatchFound ];
|
return [ 'ModuleError' => Error::NoMatchFound ];
|
||||||
|
|
||||||
|
|
||||||
return [ 'machine' => $answer ];
|
return [ 'machine' => $answer ];
|
||||||
|
@ -216,7 +216,7 @@
|
||||||
|
|
||||||
// Si aucun resultat, on retourne une erreur
|
// Si aucun resultat, on retourne une erreur
|
||||||
if( $answer === false )
|
if( $answer === false )
|
||||||
return [ 'ModuleError' => ManagerError::NoMatchFound ];
|
return [ 'ModuleError' => Error::NoMatchFound ];
|
||||||
|
|
||||||
|
|
||||||
return [ 'clusters' => $answer ];
|
return [ 'clusters' => $answer ];
|
||||||
|
@ -248,7 +248,7 @@
|
||||||
|
|
||||||
// Si on a recupere aucune machine, on retourne une erreur
|
// Si on a recupere aucune machine, on retourne une erreur
|
||||||
if( !is_array($machine_data) )
|
if( !is_array($machine_data) )
|
||||||
return ['ModuleError' => ManagerError::NoMatchFound];
|
return ['ModuleError' => Error::NoMatchFound];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -468,7 +468,7 @@
|
||||||
|
|
||||||
// Si token incorrect, on envoie une erreur
|
// Si token incorrect, on envoie une erreur
|
||||||
if( $checkToken->answer() !== true )
|
if( $checkToken->answer() !== true )
|
||||||
return [ 'ModuleError' => ManagerError::TokenError ];
|
return [ 'ModuleError' => Error::TokenError ];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace api\module;
|
namespace api\module;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \manager\ResourceDispatcher;
|
use \manager\ResourceDispatcher;
|
||||||
|
|
||||||
class module{
|
class module{
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
public static function method($params){
|
public static function method($params){
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'ModuleError' => ManagerError::Success,
|
'ModuleError' => Error::Success,
|
||||||
'ReceivedArguments' => $params
|
'ReceivedArguments' => $params
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
// Gestion de l'erreur de parsage
|
// Gestion de l'erreur de parsage
|
||||||
if( $modules == null )
|
if( $modules == null )
|
||||||
return [ 'ModuleError' => ManagerError::ParsingFailed ];
|
return [ 'ModuleError' => Error::ParsingFailed ];
|
||||||
|
|
||||||
/* [2] Mise en forme de la liste des modules
|
/* [2] Mise en forme de la liste des modules
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
/* [n] Gestion du retour
|
/* [n] Gestion du retour
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
return [
|
return [
|
||||||
'ModuleError' => ManagerError::Success,
|
'ModuleError' => Error::Success,
|
||||||
'headers' => [
|
'headers' => [
|
||||||
'Content-Type' => 'text/markdown; charset=utf-8',
|
'Content-Type' => 'text/markdown; charset=utf-8',
|
||||||
'Content-Transfer-Encoding' => 'binary',
|
'Content-Transfer-Encoding' => 'binary',
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
|
|
||||||
// Gestion de l'erreur de parsage
|
// Gestion de l'erreur de parsage
|
||||||
if( $modules == null )
|
if( $modules == null )
|
||||||
return [ 'ModuleError' => ManagerError::ParsingFailed ];
|
return [ 'ModuleError' => Error::ParsingFailed ];
|
||||||
|
|
||||||
|
|
||||||
/* [1] Début du fichier custom
|
/* [1] Début du fichier custom
|
||||||
|
@ -259,7 +259,7 @@
|
||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'ModuleError' => ManagerError::Success,
|
'ModuleError' => Error::Success,
|
||||||
'headers' => [
|
'headers' => [
|
||||||
'Content-Type' => 'application/octet-stream; charset=utf-8',
|
'Content-Type' => 'application/octet-stream; charset=utf-8',
|
||||||
'Content-Transfer-Encoding' => 'binary',
|
'Content-Transfer-Encoding' => 'binary',
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
namespace api\module;
|
namespace api\module;
|
||||||
use \database\core\Database;
|
use \database\core\Database;
|
||||||
use \manager\sessionManager;
|
use \manager\sessionManager;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \database\core\Repo;
|
use \database\core\Repo;
|
||||||
|
|
||||||
class userDefault{
|
class userDefault{
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
// Si une erreur est retournee, on retourne une erreur
|
// Si une erreur est retournee, on retourne une erreur
|
||||||
if( $id_user === false )
|
if( $id_user === false )
|
||||||
return ['ModuleError' => ManagerError::ModuleError];
|
return ['ModuleError' => Error::ModuleError];
|
||||||
|
|
||||||
|
|
||||||
/* [2] Gestion du retour
|
/* [2] Gestion du retour
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
|
|
||||||
// Si aucun resultat, on retourne une erreur
|
// Si aucun resultat, on retourne une erreur
|
||||||
if( $answer === false )
|
if( $answer === false )
|
||||||
return [ 'ModuleError' => ManagerError::NoMatchFound ];
|
return [ 'ModuleError' => Error::NoMatchFound ];
|
||||||
|
|
||||||
|
|
||||||
return [ 'user' => $answer ];
|
return [ 'user' => $answer ];
|
||||||
|
@ -194,7 +194,7 @@
|
||||||
|
|
||||||
// Si aucun resultat, on retourne une erreur
|
// Si aucun resultat, on retourne une erreur
|
||||||
if( $answer === false )
|
if( $answer === false )
|
||||||
return [ 'ModuleError' => ManagerError::NoMatchFound ];
|
return [ 'ModuleError' => Error::NoMatchFound ];
|
||||||
|
|
||||||
|
|
||||||
return [ 'user' => $answer ];
|
return [ 'user' => $answer ];
|
||||||
|
@ -224,7 +224,7 @@
|
||||||
|
|
||||||
// Si aucun resultat, on retourne une erreur
|
// Si aucun resultat, on retourne une erreur
|
||||||
if( $answer === false )
|
if( $answer === false )
|
||||||
return [ 'ModuleError' => ManagerError::NoMatchFound ];
|
return [ 'ModuleError' => Error::NoMatchFound ];
|
||||||
|
|
||||||
|
|
||||||
return [ 'user' => $answer ];
|
return [ 'user' => $answer ];
|
||||||
|
@ -254,7 +254,7 @@
|
||||||
|
|
||||||
// Si aucun resultat, on retourne une erreur
|
// Si aucun resultat, on retourne une erreur
|
||||||
if( $answer === false )
|
if( $answer === false )
|
||||||
return [ 'ModuleError' => ManagerError::NoMatchFound ];
|
return [ 'ModuleError' => Error::NoMatchFound ];
|
||||||
|
|
||||||
|
|
||||||
return [ 'clusters' => $answer ];
|
return [ 'clusters' => $answer ];
|
||||||
|
@ -289,7 +289,7 @@
|
||||||
|
|
||||||
// Si on a recupere aucun utilisateur, on retourne une erreur
|
// Si on a recupere aucun utilisateur, on retourne une erreur
|
||||||
if( !is_array($user_data) )
|
if( !is_array($user_data) )
|
||||||
return ['ModuleError' => ManagerError::NoMatchFound];
|
return ['ModuleError' => Error::NoMatchFound];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace database\core;
|
namespace database\core;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
|
|
||||||
|
|
||||||
class Database{
|
class Database{
|
||||||
|
@ -37,18 +37,18 @@
|
||||||
self::$pdo = new \PDO('mysql:host='.$this->host.';dbname='.$this->dbname, $this->username, $this->password);
|
self::$pdo = new \PDO('mysql:host='.$this->host.';dbname='.$this->dbname, $this->username, $this->password);
|
||||||
|
|
||||||
// On signale que tout s'est bien passe
|
// On signale que tout s'est bien passe
|
||||||
self::$error = ManagerError::Success;
|
self::$error = Error::Success;
|
||||||
|
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
// On signale qu'il y a une erreur
|
// On signale qu'il y a une erreur
|
||||||
self::$error = ManagerError::PDOConnection;
|
self::$error = Error::PDOConnection;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* retourne une instance de la classe */
|
/* retourne une instance de la classe */
|
||||||
public static function getInstance(){
|
public static function getInstance(){
|
||||||
if( self::$instance == null || self::$error != ManagerError::Success ){ // Si aucune instance existante OU erreur de connection
|
if( self::$instance == null || self::$error != Error::Success ){ // Si aucune instance existante OU erreur de connection
|
||||||
|
|
||||||
// chargement de la configuration du server SQL
|
// chargement de la configuration du server SQL
|
||||||
if( !checkdnsrr($_SERVER['SERVER_NAME'], 'NS') )
|
if( !checkdnsrr($_SERVER['SERVER_NAME'], 'NS') )
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace database\core;
|
namespace database\core;
|
||||||
|
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \api\core\Authentification;
|
use \api\core\Authentification;
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
|
|
||||||
// Si pas parametre manquant, on quitte
|
// Si pas parametre manquant, on quitte
|
||||||
if( $path == null ){
|
if( $path == null ){
|
||||||
$this->error = ManagerError::MissingPath;
|
$this->error = Error::MissingPath;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
|
|
||||||
// Gestion de l'erreur de parsage
|
// Gestion de l'erreur de parsage
|
||||||
if( $this->repositories == null ){
|
if( $this->repositories == null ){
|
||||||
$this->error = ManagerError::ParsingFailed;
|
$this->error = Error::ParsingFailed;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
// Type de @path
|
// Type de @path
|
||||||
if( !is_string($path) ){ // Si le type est incorrect
|
if( !is_string($path) ){ // Si le type est incorrect
|
||||||
$this->error = ManagerError::WrongPathRepo;
|
$this->error = Error::WrongPathRepo;
|
||||||
return false; // On retourne FALSE, si erreur
|
return false; // On retourne FALSE, si erreur
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
/* [3] Construction de l'objet
|
/* [3] Construction de l'objet
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
$this->params = $params;
|
$this->params = $params;
|
||||||
$this->error = ManagerError::Success;
|
$this->error = Error::Success;
|
||||||
|
|
||||||
/* [4] Enregistrement de la reponse
|
/* [4] Enregistrement de la reponse
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
|
|
||||||
|
|
||||||
public function answer(){
|
public function answer(){
|
||||||
if( $this->error != ManagerError::Success )
|
if( $this->error != Error::Success )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return $this->answer;
|
return $this->answer;
|
||||||
|
@ -121,14 +121,14 @@
|
||||||
public function dispatch(){
|
public function dispatch(){
|
||||||
/* [1] On verifie qu'aucune erreur n'a ete signalee
|
/* [1] On verifie qu'aucune erreur n'a ete signalee
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
if( $this->error != ManagerError::Success ) // si il y a une erreur
|
if( $this->error != Error::Success ) // si il y a une erreur
|
||||||
return false; // on la passe a la reponse
|
return false; // on la passe a la reponse
|
||||||
|
|
||||||
|
|
||||||
/* [2] On verifie que la methode est amorcable
|
/* [2] On verifie que la methode est amorcable
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
if( !is_callable($this->getFunctionCaller()) ){
|
if( !is_callable($this->getFunctionCaller()) ){
|
||||||
$this->error = ManagerError::UncallableMethod;
|
$this->error = Error::UncallableMethod;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@
|
||||||
/* [1] Verification format general
|
/* [1] Verification format general
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
if( !preg_match('#^([\w_-]+)/([\w_-]+)$#i', $path, $matches) ){ // Si mauvais format
|
if( !preg_match('#^([\w_-]+)/([\w_-]+)$#i', $path, $matches) ){ // Si mauvais format
|
||||||
$this->error = ManagerError::WrongPathRepo;
|
$this->error = Error::WrongPathRepo;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,14 +162,14 @@
|
||||||
/* [2] Verification de l'existence du repo (conf)
|
/* [2] Verification de l'existence du repo (conf)
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
if( !array_key_exists($repository, $this->repositories) ){ // Si le repo n'est pas specifie dans la conf
|
if( !array_key_exists($repository, $this->repositories) ){ // Si le repo n'est pas specifie dans la conf
|
||||||
$this->error = ManagerError::UnknownRepo;
|
$this->error = Error::UnknownRepo;
|
||||||
return false; // On retourne FALSE, si erreur
|
return false; // On retourne FALSE, si erreur
|
||||||
}
|
}
|
||||||
|
|
||||||
/* [3] Verification de l'existence de la methode (conf)
|
/* [3] Verification de l'existence de la methode (conf)
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
if( array_search($method, $this->repositories[$repository]) === false ){ // Si la methode n'est pas specifie dans la conf
|
if( array_search($method, $this->repositories[$repository]) === false ){ // Si la methode n'est pas specifie dans la conf
|
||||||
$this->error = ManagerError::UnknownMethod;
|
$this->error = Error::UnknownMethod;
|
||||||
return false; // On retourne FALSE, si erreur
|
return false; // On retourne FALSE, si erreur
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
namespace database\repo;
|
namespace database\repo;
|
||||||
use \database\core\Database;
|
use \database\core\Database;
|
||||||
use \database\core\Repo;
|
use \database\core\Repo;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \manager\repo\cluster as clusterRepo;
|
use \manager\repo\cluster as clusterRepo;
|
||||||
|
|
||||||
class action extends parentRepo{
|
class action extends parentRepo{
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
namespace database\repo;
|
namespace database\repo;
|
||||||
use \database\core\Database;
|
use \database\core\Database;
|
||||||
use \database\core\Repo;
|
use \database\core\Repo;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \orm\core\Table;
|
use \orm\core\Table;
|
||||||
use \orm\core\Rows;
|
use \orm\core\Rows;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
* @id_source<int> UID d'un groupe UTILISATEUR
|
* @id_source<int> UID d'un groupe UTILISATEUR
|
||||||
* @id_action<int> UID d'une ACTION
|
* @id_action<int> UID d'une ACTION
|
||||||
*
|
*
|
||||||
* @return error<ManagerError> Retourne l'erreur 'ManagerError' associée
|
* @return error<Error> Retourne l'erreur 'Error' associée
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function addPermission($id_target, $id_source, $id_action){
|
public static function addPermission($id_target, $id_source, $id_action){
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
/* (2) Si aucun résultat, on retourne une erreur */
|
/* (2) Si aucun résultat, on retourne une erreur */
|
||||||
if( $targetCheck === false )
|
if( $targetCheck === false )
|
||||||
return ManagerError::NoMatchFound;
|
return Error::NoMatchFound;
|
||||||
|
|
||||||
|
|
||||||
/* [2] On vérifie l'existance du groupe 'source'
|
/* [2] On vérifie l'existance du groupe 'source'
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
|
|
||||||
/* (2) Si aucun résultat, on retourne une erreur */
|
/* (2) Si aucun résultat, on retourne une erreur */
|
||||||
if( $sourceCheck === false )
|
if( $sourceCheck === false )
|
||||||
return ManagerError::NoMatchFound;
|
return Error::NoMatchFound;
|
||||||
|
|
||||||
|
|
||||||
/* [3] On vérifie l'existance de l'action
|
/* [3] On vérifie l'existance de l'action
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
|
|
||||||
/* (2) Si aucun résultat, on retourne une erreur */
|
/* (2) Si aucun résultat, on retourne une erreur */
|
||||||
if( $actionCheck === false )
|
if( $actionCheck === false )
|
||||||
return ManagerError::NoMatchFound;
|
return Error::NoMatchFound;
|
||||||
|
|
||||||
|
|
||||||
/* [4] On vérifie que l'entrée n'existe pas déja
|
/* [4] On vérifie que l'entrée n'existe pas déja
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
/* (3) Si les données sont identiques pour au moins une entrée, on retourne un succès */
|
/* (3) Si les données sont identiques pour au moins une entrée, on retourne un succès */
|
||||||
foreach($checkAlready as $s=>$sameTarget)
|
foreach($checkAlready as $s=>$sameTarget)
|
||||||
if( $sameTarget['id_source'] == $id_source && $sameTarget['id_action'] == $id_action )
|
if( $sameTarget['id_source'] == $id_source && $sameTarget['id_action'] == $id_action )
|
||||||
return ManagerError::Success;
|
return Error::Success;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,10 +92,10 @@
|
||||||
|
|
||||||
/* (2) Si erreur SQL, on retourne une erreur */
|
/* (2) Si erreur SQL, on retourne une erreur */
|
||||||
if( !$inserted )
|
if( !$inserted )
|
||||||
return ManagerError::RepoError;
|
return Error::RepoError;
|
||||||
|
|
||||||
|
|
||||||
return ManagerError::Success;
|
return Error::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
* @id_source<int> UID d'un groupe UTILISATEUR
|
* @id_source<int> UID d'un groupe UTILISATEUR
|
||||||
* @id_action<int> UID d'une PERMISSION
|
* @id_action<int> UID d'une PERMISSION
|
||||||
*
|
*
|
||||||
* @return error<ManagerError> Retourne l'erreur 'ManagerError' associée
|
* @return error<Error> Retourne l'erreur 'Error' associée
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function removePermission($id_target, $id_source, $id_action){
|
public static function removePermission($id_target, $id_source, $id_action){
|
||||||
|
@ -134,7 +134,7 @@
|
||||||
|
|
||||||
/* (3) Si on a pas trouvé, on retourne une erreur */
|
/* (3) Si on a pas trouvé, on retourne une erreur */
|
||||||
if( is_null($existingId) )
|
if( is_null($existingId) )
|
||||||
return ManagerError::NoMatchFound;
|
return Error::NoMatchFound;
|
||||||
|
|
||||||
|
|
||||||
/* [2] On supprime la action
|
/* [2] On supprime la action
|
||||||
|
@ -150,10 +150,10 @@
|
||||||
|
|
||||||
/* (2) Si erreur SQL, on retourne une erreur */
|
/* (2) Si erreur SQL, on retourne une erreur */
|
||||||
if( !$deleted || self::getById($existingId) !== false )
|
if( !$deleted || self::getById($existingId) !== false )
|
||||||
return ManagerError::RepoError;
|
return Error::RepoError;
|
||||||
|
|
||||||
|
|
||||||
return ManagerError::Success;
|
return Error::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
namespace database\repo;
|
namespace database\repo;
|
||||||
use \database\core\Database;
|
use \database\core\Database;
|
||||||
use \database\core\Repo;
|
use \database\core\Repo;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \orm\core\Table;
|
use \orm\core\Table;
|
||||||
use \orm\core\Rows;
|
use \orm\core\Rows;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
namespace database\repo;
|
namespace database\repo;
|
||||||
use \database\core\Database;
|
use \database\core\Database;
|
||||||
use \database\core\Repo;
|
use \database\core\Repo;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \manager\repo\cluster as clusterRepo;
|
use \manager\repo\cluster as clusterRepo;
|
||||||
|
|
||||||
class global_state extends parentRepo{
|
class global_state extends parentRepo{
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace database\repo;
|
namespace database\repo;
|
||||||
use \database\core\Database;
|
use \database\core\Database;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \database\core\Repo;
|
use \database\core\Repo;
|
||||||
use \orm\core\Table;
|
use \orm\core\Table;
|
||||||
use \orm\core\Rows;
|
use \orm\core\Rows;
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
* @id_machine_cluster<int> UID du groupe
|
* @id_machine_cluster<int> UID du groupe
|
||||||
* @id_machine<int> UID de la machine
|
* @id_machine<int> UID de la machine
|
||||||
*
|
*
|
||||||
* @return error<int> Renvoie le code 'ManagerError'
|
* @return error<int> Renvoie le code 'Error'
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function link($id_warehouse, $id_machine_cluster, $id_machine){
|
public static function link($id_warehouse, $id_machine_cluster, $id_machine){
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
|
|
||||||
// Si le groupe n'existe pas
|
// Si le groupe n'existe pas
|
||||||
if( $cluster === false )
|
if( $cluster === false )
|
||||||
return ManagerError::NoMatchFound;
|
return Error::NoMatchFound;
|
||||||
|
|
||||||
/* (2) On récupère l'utilisateur */
|
/* (2) On récupère l'utilisateur */
|
||||||
$machineR = Table::get('machine')
|
$machineR = Table::get('machine')
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
|
|
||||||
// Si l'utilisateur n'existe pas
|
// Si l'utilisateur n'existe pas
|
||||||
if( $machine === false )
|
if( $machine === false )
|
||||||
return ManagerError::NoMatchFound;
|
return Error::NoMatchFound;
|
||||||
|
|
||||||
/* (3) On vérifie qu'il n'y a pas déja d'appartenance */
|
/* (3) On vérifie qu'il n'y a pas déja d'appartenance */
|
||||||
$cluster_mergeR = Table::get('machine_cluster_merge')
|
$cluster_mergeR = Table::get('machine_cluster_merge')
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
|
|
||||||
// Si la relation existe déja, on ne fait rien
|
// Si la relation existe déja, on ne fait rien
|
||||||
if( $cluster_merge_exists !== false )
|
if( $cluster_merge_exists !== false )
|
||||||
return ManagerError::Success;
|
return Error::Success;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -117,13 +117,13 @@
|
||||||
|
|
||||||
/* (2) Si erreur, on la retourne */
|
/* (2) Si erreur, on la retourne */
|
||||||
if( !$inserted )
|
if( !$inserted )
|
||||||
return ManagerError::RepoError;
|
return Error::RepoError;
|
||||||
|
|
||||||
/* (3) On vérifie quand même que l'entrée existe */
|
/* (3) On vérifie quand même que l'entrée existe */
|
||||||
$cluster_merge_inserted = $cluster_mergeR->fetch();
|
$cluster_merge_inserted = $cluster_mergeR->fetch();
|
||||||
|
|
||||||
/* (4) Sinon, on renvoie que tout s'est bien passé */
|
/* (4) Sinon, on renvoie que tout s'est bien passé */
|
||||||
return is_array($cluster_merge_inserted) ? ManagerError::Success : ManagerError::RepoError;
|
return is_array($cluster_merge_inserted) ? Error::Success : Error::RepoError;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
* @id_machine_cluster<int> UID du groupe
|
* @id_machine_cluster<int> UID du groupe
|
||||||
* @id_machine<int> UID de la machine
|
* @id_machine<int> UID de la machine
|
||||||
*
|
*
|
||||||
* @return error<int> Renvoie le code 'ManagerError'
|
* @return error<int> Renvoie le code 'Error'
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function unlink($id_warehouse, $id_machine_cluster, $id_machine){
|
public static function unlink($id_warehouse, $id_machine_cluster, $id_machine){
|
||||||
|
@ -150,7 +150,7 @@
|
||||||
|
|
||||||
/* (2) Si on ne trouve rien */
|
/* (2) Si on ne trouve rien */
|
||||||
if( $get_merge_id === false )
|
if( $get_merge_id === false )
|
||||||
return ManagerError::NoMatchFound;
|
return Error::NoMatchFound;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -162,15 +162,15 @@
|
||||||
|
|
||||||
// Si erreur
|
// Si erreur
|
||||||
if( !$deleted )
|
if( !$deleted )
|
||||||
return ManagerError::RepoError;
|
return Error::RepoError;
|
||||||
|
|
||||||
/* [2] On verifie que l'association n'existe plus
|
/* [2] On verifie que l'association n'existe plus
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
if( self::getMerge($id_warehouse, $id_machine_cluster, $id_machine) !== false )
|
if( self::getMerge($id_warehouse, $id_machine_cluster, $id_machine) !== false )
|
||||||
return ManagerError::RepoError;
|
return Error::RepoError;
|
||||||
|
|
||||||
|
|
||||||
return ManagerError::Success;
|
return Error::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
namespace database\repo;
|
namespace database\repo;
|
||||||
use \database\core\Database;
|
use \database\core\Database;
|
||||||
use \database\core\Repo;
|
use \database\core\Repo;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \manager\repo\cluster as clusterRepo;
|
use \manager\repo\cluster as clusterRepo;
|
||||||
|
|
||||||
class pin_merge extends parentRepo{
|
class pin_merge extends parentRepo{
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
namespace database\repo;
|
namespace database\repo;
|
||||||
use \database\core\Database;
|
use \database\core\Database;
|
||||||
use \database\core\Repo;
|
use \database\core\Repo;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \manager\repo\cluster as clusterRepo;
|
use \manager\repo\cluster as clusterRepo;
|
||||||
|
|
||||||
class state extends parentRepo{
|
class state extends parentRepo{
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace database\repo;
|
namespace database\repo;
|
||||||
use \database\core\Database;
|
use \database\core\Database;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \database\core\Repo;
|
use \database\core\Repo;
|
||||||
use \orm\core\Table;
|
use \orm\core\Table;
|
||||||
use \orm\core\Rows;
|
use \orm\core\Rows;
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
* @id_user_cluster<int> UID du groupe
|
* @id_user_cluster<int> UID du groupe
|
||||||
* @id_user<int> UID de l'utilisateur
|
* @id_user<int> UID de l'utilisateur
|
||||||
*
|
*
|
||||||
* @return error<int> Renvoie le code 'ManagerError'
|
* @return error<int> Renvoie le code 'Error'
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function link($id_warehouse, $id_user_cluster, $id_user){
|
public static function link($id_warehouse, $id_user_cluster, $id_user){
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
|
|
||||||
// Si le groupe n'existe pas
|
// Si le groupe n'existe pas
|
||||||
if( $cluster === false )
|
if( $cluster === false )
|
||||||
return ManagerError::NoMatchFound;
|
return Error::NoMatchFound;
|
||||||
|
|
||||||
/* (2) On récupère l'utilisateur */
|
/* (2) On récupère l'utilisateur */
|
||||||
$userR = Table::get('user')
|
$userR = Table::get('user')
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
|
|
||||||
// Si l'utilisateur n'existe pas
|
// Si l'utilisateur n'existe pas
|
||||||
if( $user === false )
|
if( $user === false )
|
||||||
return ManagerError::NoMatchFound;
|
return Error::NoMatchFound;
|
||||||
|
|
||||||
/* (3) On vérifie qu'il n'y a pas déja d'appartenance */
|
/* (3) On vérifie qu'il n'y a pas déja d'appartenance */
|
||||||
$cluster_mergeR = Table::get('user_cluster_merge')
|
$cluster_mergeR = Table::get('user_cluster_merge')
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
|
|
||||||
// Si la relation existe déja, on ne fait rien
|
// Si la relation existe déja, on ne fait rien
|
||||||
if( $cluster_merge_exists !== false )
|
if( $cluster_merge_exists !== false )
|
||||||
return ManagerError::Success;
|
return Error::Success;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -117,13 +117,13 @@
|
||||||
|
|
||||||
/* (2) Si erreur, on la retourne */
|
/* (2) Si erreur, on la retourne */
|
||||||
if( !$inserted )
|
if( !$inserted )
|
||||||
return ManagerError::RepoError;
|
return Error::RepoError;
|
||||||
|
|
||||||
/* (3) On vérifie quand même que l'entrée existe */
|
/* (3) On vérifie quand même que l'entrée existe */
|
||||||
$cluster_merge_inserted = $cluster_mergeR->fetch();
|
$cluster_merge_inserted = $cluster_mergeR->fetch();
|
||||||
|
|
||||||
/* (4) Sinon, on renvoie que tout s'est bien passé */
|
/* (4) Sinon, on renvoie que tout s'est bien passé */
|
||||||
return is_array($cluster_merge_inserted) ? ManagerError::Success : ManagerError::RepoError;
|
return is_array($cluster_merge_inserted) ? Error::Success : Error::RepoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
* @id_user_cluster<int> UID du groupe
|
* @id_user_cluster<int> UID du groupe
|
||||||
* @id_user<int> UID de l'utilisateur
|
* @id_user<int> UID de l'utilisateur
|
||||||
*
|
*
|
||||||
* @return error<int> Renvoie le code 'ManagerError'
|
* @return error<int> Renvoie le code 'Error'
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function unlink($id_warehouse, $id_user_cluster, $id_user){
|
public static function unlink($id_warehouse, $id_user_cluster, $id_user){
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
|
|
||||||
/* (2) Si on ne trouve rien */
|
/* (2) Si on ne trouve rien */
|
||||||
if( $get_merge_id == false )
|
if( $get_merge_id == false )
|
||||||
return ManagerError::NoMatchFound;
|
return Error::NoMatchFound;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -161,15 +161,15 @@
|
||||||
|
|
||||||
// Si erreur
|
// Si erreur
|
||||||
if( !$deleted )
|
if( !$deleted )
|
||||||
return ManagerError::RepoError;
|
return Error::RepoError;
|
||||||
|
|
||||||
/* [2] On verifie que l'association n'existe plus
|
/* [2] On verifie que l'association n'existe plus
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
if( self::getMerge($id_warehouse, $id_user_cluster, $id_user) !== false )
|
if( self::getMerge($id_warehouse, $id_user_cluster, $id_user) !== false )
|
||||||
return ManagerError::ModuleError;
|
return Error::ModuleError;
|
||||||
|
|
||||||
|
|
||||||
return ManagerError::Success;
|
return Error::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
namespace manager;
|
namespace error\core;
|
||||||
|
|
||||||
|
|
||||||
class ManagerError{
|
class Error{
|
||||||
|
|
||||||
/* SUCCESS */
|
/* SUCCESS */
|
||||||
const Success = 0;
|
const Success = 0;
|
|
@ -4,7 +4,7 @@
|
||||||
namespace orm\core;
|
namespace orm\core;
|
||||||
|
|
||||||
use \database\core\Database;
|
use \database\core\Database;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \orm\core\Rows;
|
use \orm\core\Rows;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
namespace viewer\core;
|
namespace viewer\core;
|
||||||
|
|
||||||
use \viewer\core\Viewer;
|
use \viewer\core\Viewer;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Viewer{
|
class Viewer{
|
||||||
|
|
||||||
public $error = ManagerError::Success;
|
public $error = Error::Success;
|
||||||
|
|
||||||
|
|
||||||
private $template;
|
private $template;
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
public function __construct($template, $content){
|
public function __construct($template, $content){
|
||||||
// Si pas parametre manquant, on quitte
|
// Si pas parametre manquant, on quitte
|
||||||
if( $template == null ){
|
if( $template == null ){
|
||||||
$this->error = ManagerError::MissingPath;
|
$this->error = Error::MissingPath;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
/* [1] On vérifie le format
|
/* [1] On vérifie le format
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
if( !preg_match('/^([a-z]+)\.([a-z]+)$/i', $template, $match) ){
|
if( !preg_match('/^([a-z]+)\.([a-z]+)$/i', $template, $match) ){
|
||||||
$this->error = ManagerError::ParamError;
|
$this->error = Error::ParamError;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,13 +110,13 @@
|
||||||
|
|
||||||
/* (1) On vérifie que la classe existe */
|
/* (1) On vérifie que la classe existe */
|
||||||
if( !class_exists($class) ){
|
if( !class_exists($class) ){
|
||||||
$this->error = ManagerError::UnknownTemplate;
|
$this->error = Error::UnknownTemplate;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (2) On vérifie que la méthode existe */
|
/* (2) On vérifie que la méthode existe */
|
||||||
if( !method_exists($class, $method) ){
|
if( !method_exists($class, $method) ){
|
||||||
$this->error = ManagerError::UnknownTemplate;
|
$this->error = Error::UnknownTemplate;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
namespace viewer\view\group;
|
namespace viewer\view\group;
|
||||||
use \viewer\core\Viewer;
|
use \viewer\core\Viewer;
|
||||||
use \api\core\ModuleRequest;
|
use \api\core\ModuleRequest;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \api\core\Authentification;
|
use \api\core\Authentification;
|
||||||
use \manager\repo\cluster as clusterRepo;
|
use \manager\repo\cluster as clusterRepo;
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
$getUserClusters = $getUserClustersReq->dispatch();
|
$getUserClusters = $getUserClustersReq->dispatch();
|
||||||
|
|
||||||
/* (2) Si on ne le trouve pas, on retourne une erreur */
|
/* (2) Si on ne le trouve pas, on retourne une erreur */
|
||||||
if( $getUserClusters->error != ManagerError::Success )
|
if( $getUserClusters->error != Error::Success )
|
||||||
return Viewer::$htmlError;
|
return Viewer::$htmlError;
|
||||||
|
|
||||||
/* (3) On récupère les données du groupe */
|
/* (3) On récupère les données du groupe */
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
$getMachineClusters = $getMachineClustersReq->dispatch();
|
$getMachineClusters = $getMachineClustersReq->dispatch();
|
||||||
|
|
||||||
/* (2) Si on ne le trouve pas, on retourne une erreur */
|
/* (2) Si on ne le trouve pas, on retourne une erreur */
|
||||||
if( $getMachineClusters->error != ManagerError::Success )
|
if( $getMachineClusters->error != Error::Success )
|
||||||
return Viewer::$htmlError;
|
return Viewer::$htmlError;
|
||||||
|
|
||||||
/* (3) On récupère les données du groupe */
|
/* (3) On récupère les données du groupe */
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
namespace viewer\view\group;
|
namespace viewer\view\group;
|
||||||
use \viewer\core\Viewer;
|
use \viewer\core\Viewer;
|
||||||
use \api\core\ModuleRequest;
|
use \api\core\ModuleRequest;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \api\core\Authentification;
|
use \api\core\Authentification;
|
||||||
use \manager\repo\cluster as clusterRepo;
|
use \manager\repo\cluster as clusterRepo;
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
$checktypeResponse = $checktypeRequest->dispatch();
|
$checktypeResponse = $checktypeRequest->dispatch();
|
||||||
|
|
||||||
/* (2) Si on ne le trouve pas, on retourne une erreur */
|
/* (2) Si on ne le trouve pas, on retourne une erreur */
|
||||||
if( $checktypeResponse->error != ManagerError::Success )
|
if( $checktypeResponse->error != Error::Success )
|
||||||
return Viewer::$htmlError;
|
return Viewer::$htmlError;
|
||||||
|
|
||||||
/* (3) On récupère les données du groupe */
|
/* (3) On récupère les données du groupe */
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
$getmembersResponse = $getmembersRequest->dispatch();
|
$getmembersResponse = $getmembersRequest->dispatch();
|
||||||
|
|
||||||
/* (2) Si erreur, on retourne l'erreur */
|
/* (2) Si erreur, on retourne l'erreur */
|
||||||
if( $getmembersResponse->error != ManagerError::Success )
|
if( $getmembersResponse->error != Error::Success )
|
||||||
return Viewer::$htmlError;
|
return Viewer::$htmlError;
|
||||||
|
|
||||||
/* (3) On récupère la liste des UID uniquement */
|
/* (3) On récupère la liste des UID uniquement */
|
||||||
|
@ -137,7 +137,7 @@
|
||||||
$getusersResponse = $getusersRequest->dispatch(); // On recupere la reponse
|
$getusersResponse = $getusersRequest->dispatch(); // On recupere la reponse
|
||||||
|
|
||||||
/* (2) si erreur, on affiche l'explicitation */
|
/* (2) si erreur, on affiche l'explicitation */
|
||||||
if( $getusersResponse->error != ManagerError::Success )
|
if( $getusersResponse->error != Error::Success )
|
||||||
return Viewer::$htmlError;
|
return Viewer::$htmlError;
|
||||||
|
|
||||||
/* (3) On récupère la liste des utilisateurs */
|
/* (3) On récupère la liste des utilisateurs */
|
||||||
|
@ -170,7 +170,7 @@
|
||||||
$getmachinesResponse = $getmachinesRequest->dispatch(); // On recupere la reponse
|
$getmachinesResponse = $getmachinesRequest->dispatch(); // On recupere la reponse
|
||||||
|
|
||||||
/* (2) si erreur, on affiche l'explicitation */
|
/* (2) si erreur, on affiche l'explicitation */
|
||||||
if( $getmachinesResponse->error != ManagerError::Success )
|
if( $getmachinesResponse->error != Error::Success )
|
||||||
return Viewer::$htmlError;
|
return Viewer::$htmlError;
|
||||||
|
|
||||||
/* (3) On récupère la liste des machines */
|
/* (3) On récupère la liste des machines */
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
use \viewer\core\Viewer;
|
use \viewer\core\Viewer;
|
||||||
use \api\core\ModuleRequest;
|
use \api\core\ModuleRequest;
|
||||||
use \api\core\Authentification;
|
use \api\core\Authentification;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
|
|
||||||
class group_view{
|
class group_view{
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
$getAllUsers = $getAllUsersReq->dispatch();
|
$getAllUsers = $getAllUsersReq->dispatch();
|
||||||
|
|
||||||
/* (2) si erreur, on affiche l'explicitation */
|
/* (2) si erreur, on affiche l'explicitation */
|
||||||
if( $getAllUsers->error != ManagerError::Success )
|
if( $getAllUsers->error != Error::Success )
|
||||||
return Viewer::$htmlError;
|
return Viewer::$htmlError;
|
||||||
|
|
||||||
/* (3) On enregistre le résultat */
|
/* (3) On enregistre le résultat */
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
$getAllMachines = $getAllMachinesReq->dispatch();
|
$getAllMachines = $getAllMachinesReq->dispatch();
|
||||||
|
|
||||||
/* (2) si erreur, on affiche l'explicitation */
|
/* (2) si erreur, on affiche l'explicitation */
|
||||||
if( $getAllMachines->error != ManagerError::Success )
|
if( $getAllMachines->error != Error::Success )
|
||||||
return Viewer::$htmlError;
|
return Viewer::$htmlError;
|
||||||
|
|
||||||
/* (3) On enregistre le résultat */
|
/* (3) On enregistre le résultat */
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
$membersRes = $membersReq->dispatch();
|
$membersRes = $membersReq->dispatch();
|
||||||
|
|
||||||
/* (2) Gestion si erreur */
|
/* (2) Gestion si erreur */
|
||||||
if( $membersRes->error == ManagerError::Success ) $members = $membersRes->get('members');
|
if( $membersRes->error == Error::Success ) $members = $membersRes->get('members');
|
||||||
else $members = [];
|
else $members = [];
|
||||||
|
|
||||||
/* (3) On crées les vues des membres (utilisateurs) */
|
/* (3) On crées les vues des membres (utilisateurs) */
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
$membersRes = $membersReq->dispatch();
|
$membersRes = $membersReq->dispatch();
|
||||||
|
|
||||||
/* (2) Gestion si erreur */
|
/* (2) Gestion si erreur */
|
||||||
if( $membersRes->error == ManagerError::Success ) $members = $membersRes->get('members');
|
if( $membersRes->error == Error::Success ) $members = $membersRes->get('members');
|
||||||
else $members = [];
|
else $members = [];
|
||||||
|
|
||||||
/* (3) On crées les vues des membres (machines) */
|
/* (3) On crées les vues des membres (machines) */
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
use \viewer\core\Viewer;
|
use \viewer\core\Viewer;
|
||||||
use \api\core\ModuleRequest;
|
use \api\core\ModuleRequest;
|
||||||
use \api\core\Authentification;
|
use \api\core\Authentification;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
|
|
||||||
class machine_groups{
|
class machine_groups{
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
$answer = $request->dispatch();
|
$answer = $request->dispatch();
|
||||||
|
|
||||||
// si erreur, on affiche l'explicitation
|
// si erreur, on affiche l'explicitation
|
||||||
if( $answer->error != ManagerError::Success )
|
if( $answer->error != Error::Success )
|
||||||
return Viewer::$htmlError;
|
return Viewer::$htmlError;
|
||||||
|
|
||||||
$CLUSTERLIST = $answer->get('clusters');
|
$CLUSTERLIST = $answer->get('clusters');
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
$machinesRes = $machinesReq->dispatch();
|
$machinesRes = $machinesReq->dispatch();
|
||||||
|
|
||||||
/* (2) Gestion si erreur */
|
/* (2) Gestion si erreur */
|
||||||
if( $machinesRes->error == ManagerError::Success ) $machines = $machinesRes->get('members');
|
if( $machinesRes->error == Error::Success ) $machines = $machinesRes->get('members');
|
||||||
else $machines = [];
|
else $machines = [];
|
||||||
|
|
||||||
$CLUSTERLIST[$c]['count'] = count($machines);
|
$CLUSTERLIST[$c]['count'] = count($machines);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
use \viewer\core\Viewer;
|
use \viewer\core\Viewer;
|
||||||
use \api\core\ModuleRequest;
|
use \api\core\ModuleRequest;
|
||||||
use \api\core\Authentification;
|
use \api\core\Authentification;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
|
|
||||||
class machine_view{
|
class machine_view{
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
$answer = $request->dispatch(); // On recupere la reponse
|
$answer = $request->dispatch(); // On recupere la reponse
|
||||||
|
|
||||||
// si erreur, on affiche l'explicitation
|
// si erreur, on affiche l'explicitation
|
||||||
if( $answer->error != ManagerError::Success )
|
if( $answer->error != Error::Success )
|
||||||
return Viewer::$htmlError;
|
return Viewer::$htmlError;
|
||||||
|
|
||||||
$MACHINELIST = $answer->get('machines');
|
$MACHINELIST = $answer->get('machines');
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
$clustersRes = $clustersReq->dispatch();
|
$clustersRes = $clustersReq->dispatch();
|
||||||
|
|
||||||
/* (2) Gestion si erreur */
|
/* (2) Gestion si erreur */
|
||||||
if( $clustersRes->error == ManagerError::Success ) $clusters = $clustersRes->get('clusters');
|
if( $clustersRes->error == Error::Success ) $clusters = $clustersRes->get('clusters');
|
||||||
else $clusters = [];
|
else $clusters = [];
|
||||||
|
|
||||||
$MACHINELIST[$u]['grouplist'] = Viewer::replaceMultiple(
|
$MACHINELIST[$u]['grouplist'] = Viewer::replaceMultiple(
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
use \viewer\core\Viewer;
|
use \viewer\core\Viewer;
|
||||||
use \api\core\ModuleRequest;
|
use \api\core\ModuleRequest;
|
||||||
use \api\core\Authentification;
|
use \api\core\Authentification;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
|
|
||||||
class user_groups{
|
class user_groups{
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
$answer = $request->dispatch();
|
$answer = $request->dispatch();
|
||||||
|
|
||||||
// si erreur, on affiche l'explicitation
|
// si erreur, on affiche l'explicitation
|
||||||
if( $answer->error != ManagerError::Success )
|
if( $answer->error != Error::Success )
|
||||||
return Viewer::$htmlError;
|
return Viewer::$htmlError;
|
||||||
|
|
||||||
$CLUSTERLIST = $answer->get('clusters');
|
$CLUSTERLIST = $answer->get('clusters');
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
$usersRes = $usersReq->dispatch();
|
$usersRes = $usersReq->dispatch();
|
||||||
|
|
||||||
/* (2) Gestion si erreur */
|
/* (2) Gestion si erreur */
|
||||||
if( $usersRes->error == ManagerError::Success ) $users = $usersRes->get('members');
|
if( $usersRes->error == Error::Success ) $users = $usersRes->get('members');
|
||||||
else $users = [];
|
else $users = [];
|
||||||
|
|
||||||
$CLUSTERLIST[$c]['count'] = count($users);
|
$CLUSTERLIST[$c]['count'] = count($users);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
use \viewer\core\Viewer;
|
use \viewer\core\Viewer;
|
||||||
use \api\core\ModuleRequest;
|
use \api\core\ModuleRequest;
|
||||||
use \api\core\Authentification;
|
use \api\core\Authentification;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
|
|
||||||
class user_view{
|
class user_view{
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
$answer = $request->dispatch(); // On recupere la reponse
|
$answer = $request->dispatch(); // On recupere la reponse
|
||||||
|
|
||||||
// si erreur, on affiche l'explicitation
|
// si erreur, on affiche l'explicitation
|
||||||
if( $answer->error != ManagerError::Success )
|
if( $answer->error != Error::Success )
|
||||||
return Viewer::$htmlError;
|
return Viewer::$htmlError;
|
||||||
|
|
||||||
$USERLIST = $answer->get('users');
|
$USERLIST = $answer->get('users');
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
$clustersRes = $clustersReq->dispatch();
|
$clustersRes = $clustersReq->dispatch();
|
||||||
|
|
||||||
/* (2) Gestion si erreur */
|
/* (2) Gestion si erreur */
|
||||||
if( $clustersRes->error == ManagerError::Success ) $clusters = $clustersRes->get('clusters');
|
if( $clustersRes->error == Error::Success ) $clusters = $clustersRes->get('clusters');
|
||||||
else $clusters = [];
|
else $clusters = [];
|
||||||
|
|
||||||
$USERLIST[$u]['grouplist'] = Viewer::replaceMultiple(
|
$USERLIST[$u]['grouplist'] = Viewer::replaceMultiple(
|
||||||
|
|
|
@ -229,18 +229,18 @@
|
||||||
<tr class="success popin" data-title="4 tests cover line 34" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="34"></a><a href="#34">34</a></div></td><td class="codeLine"> self::$pdo = new \PDO('mysql:host='.$this->host.';dbname='.$this->dbname, $this->username, $this->password);</td></tr>
|
<tr class="success popin" data-title="4 tests cover line 34" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="34"></a><a href="#34">34</a></div></td><td class="codeLine"> self::$pdo = new \PDO('mysql:host='.$this->host.';dbname='.$this->dbname, $this->username, $this->password);</td></tr>
|
||||||
<tr><td><div align="right"><a name="35"></a><a href="#35">35</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="35"></a><a href="#35">35</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="36"></a><a href="#36">36</a></div></td><td class="codeLine"> // On signale que tout s'est bien passe</td></tr>
|
<tr><td><div align="right"><a name="36"></a><a href="#36">36</a></div></td><td class="codeLine"> // On signale que tout s'est bien passe</td></tr>
|
||||||
<tr class="success popin" data-title="4 tests cover line 37" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="37"></a><a href="#37">37</a></div></td><td class="codeLine"> self::$error = ManagerError::Success;</td></tr>
|
<tr class="success popin" data-title="4 tests cover line 37" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="37"></a><a href="#37">37</a></div></td><td class="codeLine"> self::$error = Error::Success;</td></tr>
|
||||||
<tr><td><div align="right"><a name="38"></a><a href="#38">38</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="38"></a><a href="#38">38</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr class="success popin" data-title="4 tests cover line 39" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="39"></a><a href="#39">39</a></div></td><td class="codeLine"> }catch(Exception $e){</td></tr>
|
<tr class="success popin" data-title="4 tests cover line 39" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="39"></a><a href="#39">39</a></div></td><td class="codeLine"> }catch(Exception $e){</td></tr>
|
||||||
<tr><td><div align="right"><a name="40"></a><a href="#40">40</a></div></td><td class="codeLine"> // On signale qu'il y a une erreur</td></tr>
|
<tr><td><div align="right"><a name="40"></a><a href="#40">40</a></div></td><td class="codeLine"> // On signale qu'il y a une erreur</td></tr>
|
||||||
<tr class="danger"><td><div align="right"><a name="41"></a><a href="#41">41</a></div></td><td class="codeLine"> self::$error = ManagerError::PDOConnection;</td></tr>
|
<tr class="danger"><td><div align="right"><a name="41"></a><a href="#41">41</a></div></td><td class="codeLine"> self::$error = Error::PDOConnection;</td></tr>
|
||||||
<tr><td><div align="right"><a name="42"></a><a href="#42">42</a></div></td><td class="codeLine"> }</td></tr>
|
<tr><td><div align="right"><a name="42"></a><a href="#42">42</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
<tr class="success popin" data-title="4 tests cover line 43" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="43"></a><a href="#43">43</a></div></td><td class="codeLine"> }</td></tr>
|
<tr class="success popin" data-title="4 tests cover line 43" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="43"></a><a href="#43">43</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
<tr><td><div align="right"><a name="44"></a><a href="#44">44</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="44"></a><a href="#44">44</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="45"></a><a href="#45">45</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="45"></a><a href="#45">45</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="46"></a><a href="#46">46</a></div></td><td class="codeLine"> /* retourne une instance de la classe */</td></tr>
|
<tr><td><div align="right"><a name="46"></a><a href="#46">46</a></div></td><td class="codeLine"> /* retourne une instance de la classe */</td></tr>
|
||||||
<tr><td><div align="right"><a name="47"></a><a href="#47">47</a></div></td><td class="codeLine"> public static function getInstance(){</td></tr>
|
<tr><td><div align="right"><a name="47"></a><a href="#47">47</a></div></td><td class="codeLine"> public static function getInstance(){</td></tr>
|
||||||
<tr class="success popin" data-title="5 tests cover line 48" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_construct::testPDO</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="48"></a><a href="#48">48</a></div></td><td class="codeLine"> if( self::$instance == null || self::$error != ManagerError::Success ){ // Si aucune instance existante OU erreur de connection</td></tr>
|
<tr class="success popin" data-title="5 tests cover line 48" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_construct::testPDO</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="48"></a><a href="#48">48</a></div></td><td class="codeLine"> if( self::$instance == null || self::$error != Error::Success ){ // Si aucune instance existante OU erreur de connection</td></tr>
|
||||||
<tr><td><div align="right"><a name="49"></a><a href="#49">49</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="49"></a><a href="#49">49</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="50"></a><a href="#50">50</a></div></td><td class="codeLine"> // chargement de la configuration du server SQL</td></tr>
|
<tr><td><div align="right"><a name="50"></a><a href="#50">50</a></div></td><td class="codeLine"> // chargement de la configuration du server SQL</td></tr>
|
||||||
<tr class="success popin" data-title="4 tests cover line 51" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="51"></a><a href="#51">51</a></div></td><td class="codeLine"> if( !isset($_SERVER['HTTP_HOST']) || isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] == 'stefproject' )</td></tr>
|
<tr class="success popin" data-title="4 tests cover line 51" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="51"></a><a href="#51">51</a></div></td><td class="codeLine"> if( !isset($_SERVER['HTTP_HOST']) || isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] == 'stefproject' )</td></tr>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Code Coverage for /var/www/stefproject/manager/ManagerError.php</title>
|
<title>Code Coverage for /var/www/stefproject/manager/Error.php</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link href="css/bootstrap.min.css" rel="stylesheet">
|
<link href="css/bootstrap.min.css" rel="stylesheet">
|
||||||
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
|
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<ul class="breadcrumb">
|
<ul class="breadcrumb">
|
||||||
<li><a href="index.html">/var/www/stefproject/manager</a> <span class="divider">/</span></li>
|
<li><a href="index.html">/var/www/stefproject/manager</a> <span class="divider">/</span></li>
|
||||||
<li class="active">ManagerError.php</li>
|
<li class="active">Error.php</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="success">ManagerError</td>
|
<td class="success">Error</td>
|
||||||
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
<div class="bar" style="width: 100.00%;"></div>
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
<tr><td><div align="right"><a name="4"></a><a href="#4">4</a></div></td><td class="codeLine"> namespace manager;</td></tr>
|
<tr><td><div align="right"><a name="4"></a><a href="#4">4</a></div></td><td class="codeLine"> namespace manager;</td></tr>
|
||||||
<tr><td><div align="right"><a name="5"></a><a href="#5">5</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="5"></a><a href="#5">5</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="6"></a><a href="#6">6</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="6"></a><a href="#6">6</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="7"></a><a href="#7">7</a></div></td><td class="codeLine"> class ManagerError{</td></tr>
|
<tr><td><div align="right"><a name="7"></a><a href="#7">7</a></div></td><td class="codeLine"> class Error{</td></tr>
|
||||||
<tr><td><div align="right"><a name="8"></a><a href="#8">8</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="8"></a><a href="#8">8</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="9"></a><a href="#9">9</a></div></td><td class="codeLine"> /* SUCCESS */</td></tr>
|
<tr><td><div align="right"><a name="9"></a><a href="#9">9</a></div></td><td class="codeLine"> /* SUCCESS */</td></tr>
|
||||||
<tr><td><div align="right"><a name="10"></a><a href="#10">10</a></div></td><td class="codeLine"> const Success = 0;</td></tr>
|
<tr><td><div align="right"><a name="10"></a><a href="#10">10</a></div></td><td class="codeLine"> const Success = 0;</td></tr>
|
||||||
|
@ -180,31 +180,31 @@
|
||||||
<tr><td><div align="right"><a name="70"></a><a href="#70">70</a></div></td><td class="codeLine"> */</td></tr>
|
<tr><td><div align="right"><a name="70"></a><a href="#70">70</a></div></td><td class="codeLine"> */</td></tr>
|
||||||
<tr><td><div align="right"><a name="71"></a><a href="#71">71</a></div></td><td class="codeLine"> public static function explicit($error){</td></tr>
|
<tr><td><div align="right"><a name="71"></a><a href="#71">71</a></div></td><td class="codeLine"> public static function explicit($error){</td></tr>
|
||||||
<tr><td><div align="right"><a name="72"></a><a href="#72">72</a></div></td><td class="codeLine"> switch($error){</td></tr>
|
<tr><td><div align="right"><a name="72"></a><a href="#72">72</a></div></td><td class="codeLine"> switch($error){</td></tr>
|
||||||
<tr class="success popin" data-title="16 tests cover line 73" data-content="<ul><li class="success">phpunit\ManagerError::testErrorSuccess</li><li class="success">phpunit\ManagerError::testErrorParsingFailed</li><li class="success">phpunit\ManagerError::testErrorInvalidFlags</li><li class="success">phpunit\ManagerError::testErrorUnreachableResource</li><li class="success">phpunit\ManagerError::testErrorMissingPath</li><li class="success">phpunit\ManagerError::testErrorWrongPathModule</li><li class="success">phpunit\ManagerError::testErrorUnknownModule</li><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorWrongPathRepo</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="73"></a><a href="#73">73</a></div></td><td class="codeLine"> case self::Success: return "Tout s'est bien deroule"; break;</td></tr>
|
<tr class="success popin" data-title="16 tests cover line 73" data-content="<ul><li class="success">phpunit\Error::testErrorSuccess</li><li class="success">phpunit\Error::testErrorParsingFailed</li><li class="success">phpunit\Error::testErrorInvalidFlags</li><li class="success">phpunit\Error::testErrorUnreachableResource</li><li class="success">phpunit\Error::testErrorMissingPath</li><li class="success">phpunit\Error::testErrorWrongPathModule</li><li class="success">phpunit\Error::testErrorUnknownModule</li><li class="success">phpunit\Error::testErrorUnknownMethod</li><li class="success">phpunit\Error::testErrorUncallableMethod</li><li class="success">phpunit\Error::testErrorParamError</li><li class="success">phpunit\Error::testErrorModuleError</li><li class="success">phpunit\Error::testErrorWrongPathRepo</li><li class="success">phpunit\Error::testErrorUnknownRepo</li><li class="success">phpunit\Error::testErrorRepoError</li><li class="success">phpunit\Error::testErrorPDOConnection</li><li class="success">phpunit\Error::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="73"></a><a href="#73">73</a></div></td><td class="codeLine"> case self::Success: return "Tout s'est bien deroule"; break;</td></tr>
|
||||||
<tr><td><div align="right"><a name="74"></a><a href="#74">74</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="74"></a><a href="#74">74</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr class="success popin" data-title="15 tests cover line 75" data-content="<ul><li class="success">phpunit\ManagerError::testErrorParsingFailed</li><li class="success">phpunit\ManagerError::testErrorInvalidFlags</li><li class="success">phpunit\ManagerError::testErrorUnreachableResource</li><li class="success">phpunit\ManagerError::testErrorMissingPath</li><li class="success">phpunit\ManagerError::testErrorWrongPathModule</li><li class="success">phpunit\ManagerError::testErrorUnknownModule</li><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorWrongPathRepo</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="75"></a><a href="#75">75</a></div></td><td class="codeLine"> case self::ParsingFailed: return "La lecture du fichier JSON a echoue"; break;</td></tr>
|
<tr class="success popin" data-title="15 tests cover line 75" data-content="<ul><li class="success">phpunit\Error::testErrorParsingFailed</li><li class="success">phpunit\Error::testErrorInvalidFlags</li><li class="success">phpunit\Error::testErrorUnreachableResource</li><li class="success">phpunit\Error::testErrorMissingPath</li><li class="success">phpunit\Error::testErrorWrongPathModule</li><li class="success">phpunit\Error::testErrorUnknownModule</li><li class="success">phpunit\Error::testErrorUnknownMethod</li><li class="success">phpunit\Error::testErrorUncallableMethod</li><li class="success">phpunit\Error::testErrorParamError</li><li class="success">phpunit\Error::testErrorModuleError</li><li class="success">phpunit\Error::testErrorWrongPathRepo</li><li class="success">phpunit\Error::testErrorUnknownRepo</li><li class="success">phpunit\Error::testErrorRepoError</li><li class="success">phpunit\Error::testErrorPDOConnection</li><li class="success">phpunit\Error::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="75"></a><a href="#75">75</a></div></td><td class="codeLine"> case self::ParsingFailed: return "La lecture du fichier JSON a echoue"; break;</td></tr>
|
||||||
<tr><td><div align="right"><a name="76"></a><a href="#76">76</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="76"></a><a href="#76">76</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr class="success popin" data-title="14 tests cover line 77" data-content="<ul><li class="success">phpunit\ManagerError::testErrorInvalidFlags</li><li class="success">phpunit\ManagerError::testErrorUnreachableResource</li><li class="success">phpunit\ManagerError::testErrorMissingPath</li><li class="success">phpunit\ManagerError::testErrorWrongPathModule</li><li class="success">phpunit\ManagerError::testErrorUnknownModule</li><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorWrongPathRepo</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="77"></a><a href="#77">77</a></div></td><td class="codeLine"> case self::InvalidFlags: return "Les specifications (drapeaux) sont incorrects"; break;</td></tr>
|
<tr class="success popin" data-title="14 tests cover line 77" data-content="<ul><li class="success">phpunit\Error::testErrorInvalidFlags</li><li class="success">phpunit\Error::testErrorUnreachableResource</li><li class="success">phpunit\Error::testErrorMissingPath</li><li class="success">phpunit\Error::testErrorWrongPathModule</li><li class="success">phpunit\Error::testErrorUnknownModule</li><li class="success">phpunit\Error::testErrorUnknownMethod</li><li class="success">phpunit\Error::testErrorUncallableMethod</li><li class="success">phpunit\Error::testErrorParamError</li><li class="success">phpunit\Error::testErrorModuleError</li><li class="success">phpunit\Error::testErrorWrongPathRepo</li><li class="success">phpunit\Error::testErrorUnknownRepo</li><li class="success">phpunit\Error::testErrorRepoError</li><li class="success">phpunit\Error::testErrorPDOConnection</li><li class="success">phpunit\Error::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="77"></a><a href="#77">77</a></div></td><td class="codeLine"> case self::InvalidFlags: return "Les specifications (drapeaux) sont incorrects"; break;</td></tr>
|
||||||
<tr class="success popin" data-title="13 tests cover line 78" data-content="<ul><li class="success">phpunit\ManagerError::testErrorUnreachableResource</li><li class="success">phpunit\ManagerError::testErrorMissingPath</li><li class="success">phpunit\ManagerError::testErrorWrongPathModule</li><li class="success">phpunit\ManagerError::testErrorUnknownModule</li><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorWrongPathRepo</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="78"></a><a href="#78">78</a></div></td><td class="codeLine"> case self::UnreachableResource: return "La ressource n'existe pas (404)"; break;</td></tr>
|
<tr class="success popin" data-title="13 tests cover line 78" data-content="<ul><li class="success">phpunit\Error::testErrorUnreachableResource</li><li class="success">phpunit\Error::testErrorMissingPath</li><li class="success">phpunit\Error::testErrorWrongPathModule</li><li class="success">phpunit\Error::testErrorUnknownModule</li><li class="success">phpunit\Error::testErrorUnknownMethod</li><li class="success">phpunit\Error::testErrorUncallableMethod</li><li class="success">phpunit\Error::testErrorParamError</li><li class="success">phpunit\Error::testErrorModuleError</li><li class="success">phpunit\Error::testErrorWrongPathRepo</li><li class="success">phpunit\Error::testErrorUnknownRepo</li><li class="success">phpunit\Error::testErrorRepoError</li><li class="success">phpunit\Error::testErrorPDOConnection</li><li class="success">phpunit\Error::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="78"></a><a href="#78">78</a></div></td><td class="codeLine"> case self::UnreachableResource: return "La ressource n'existe pas (404)"; break;</td></tr>
|
||||||
<tr class="success popin" data-title="12 tests cover line 79" data-content="<ul><li class="success">phpunit\ManagerError::testErrorMissingPath</li><li class="success">phpunit\ManagerError::testErrorWrongPathModule</li><li class="success">phpunit\ManagerError::testErrorUnknownModule</li><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorWrongPathRepo</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="79"></a><a href="#79">79</a></div></td><td class="codeLine"> case self::MissingPath: return "Le chemin de delegation n'a pas ete renseigne"; break;</td></tr>
|
<tr class="success popin" data-title="12 tests cover line 79" data-content="<ul><li class="success">phpunit\Error::testErrorMissingPath</li><li class="success">phpunit\Error::testErrorWrongPathModule</li><li class="success">phpunit\Error::testErrorUnknownModule</li><li class="success">phpunit\Error::testErrorUnknownMethod</li><li class="success">phpunit\Error::testErrorUncallableMethod</li><li class="success">phpunit\Error::testErrorParamError</li><li class="success">phpunit\Error::testErrorModuleError</li><li class="success">phpunit\Error::testErrorWrongPathRepo</li><li class="success">phpunit\Error::testErrorUnknownRepo</li><li class="success">phpunit\Error::testErrorRepoError</li><li class="success">phpunit\Error::testErrorPDOConnection</li><li class="success">phpunit\Error::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="79"></a><a href="#79">79</a></div></td><td class="codeLine"> case self::MissingPath: return "Le chemin de delegation n'a pas ete renseigne"; break;</td></tr>
|
||||||
<tr class="success popin" data-title="11 tests cover line 80" data-content="<ul><li class="success">phpunit\ManagerError::testErrorWrongPathModule</li><li class="success">phpunit\ManagerError::testErrorUnknownModule</li><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorWrongPathRepo</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="80"></a><a href="#80">80</a></div></td><td class="codeLine"> case self::WrongPathModule: return "Le chemin de delegation est incorrect ('nomModule/nomMethode')"; break;</td></tr>
|
<tr class="success popin" data-title="11 tests cover line 80" data-content="<ul><li class="success">phpunit\Error::testErrorWrongPathModule</li><li class="success">phpunit\Error::testErrorUnknownModule</li><li class="success">phpunit\Error::testErrorUnknownMethod</li><li class="success">phpunit\Error::testErrorUncallableMethod</li><li class="success">phpunit\Error::testErrorParamError</li><li class="success">phpunit\Error::testErrorModuleError</li><li class="success">phpunit\Error::testErrorWrongPathRepo</li><li class="success">phpunit\Error::testErrorUnknownRepo</li><li class="success">phpunit\Error::testErrorRepoError</li><li class="success">phpunit\Error::testErrorPDOConnection</li><li class="success">phpunit\Error::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="80"></a><a href="#80">80</a></div></td><td class="codeLine"> case self::WrongPathModule: return "Le chemin de delegation est incorrect ('nomModule/nomMethode')"; break;</td></tr>
|
||||||
<tr class="success popin" data-title="10 tests cover line 81" data-content="<ul><li class="success">phpunit\ManagerError::testErrorUnknownModule</li><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorWrongPathRepo</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="81"></a><a href="#81">81</a></div></td><td class="codeLine"> case self::WrongPathRepo: return "Le chemin de delegation est incorrect ('nomRepo/nomMethode')"; break;</td></tr>
|
<tr class="success popin" data-title="10 tests cover line 81" data-content="<ul><li class="success">phpunit\Error::testErrorUnknownModule</li><li class="success">phpunit\Error::testErrorUnknownMethod</li><li class="success">phpunit\Error::testErrorUncallableMethod</li><li class="success">phpunit\Error::testErrorParamError</li><li class="success">phpunit\Error::testErrorModuleError</li><li class="success">phpunit\Error::testErrorWrongPathRepo</li><li class="success">phpunit\Error::testErrorUnknownRepo</li><li class="success">phpunit\Error::testErrorRepoError</li><li class="success">phpunit\Error::testErrorPDOConnection</li><li class="success">phpunit\Error::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="81"></a><a href="#81">81</a></div></td><td class="codeLine"> case self::WrongPathRepo: return "Le chemin de delegation est incorrect ('nomRepo/nomMethode')"; break;</td></tr>
|
||||||
<tr class="success popin" data-title="9 tests cover line 82" data-content="<ul><li class="success">phpunit\ManagerError::testErrorUnknownModule</li><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="82"></a><a href="#82">82</a></div></td><td class="codeLine"> case self::UnknownModule: return "Le module n'existe pas"; break;</td></tr>
|
<tr class="success popin" data-title="9 tests cover line 82" data-content="<ul><li class="success">phpunit\Error::testErrorUnknownModule</li><li class="success">phpunit\Error::testErrorUnknownMethod</li><li class="success">phpunit\Error::testErrorUncallableMethod</li><li class="success">phpunit\Error::testErrorParamError</li><li class="success">phpunit\Error::testErrorModuleError</li><li class="success">phpunit\Error::testErrorUnknownRepo</li><li class="success">phpunit\Error::testErrorRepoError</li><li class="success">phpunit\Error::testErrorPDOConnection</li><li class="success">phpunit\Error::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="82"></a><a href="#82">82</a></div></td><td class="codeLine"> case self::UnknownModule: return "Le module n'existe pas"; break;</td></tr>
|
||||||
<tr class="success popin" data-title="8 tests cover line 83" data-content="<ul><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorUnknownRepo</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="83"></a><a href="#83">83</a></div></td><td class="codeLine"> case self::UnknownRepo: return "Le repo n'existe pas"; break;</td></tr>
|
<tr class="success popin" data-title="8 tests cover line 83" data-content="<ul><li class="success">phpunit\Error::testErrorUnknownMethod</li><li class="success">phpunit\Error::testErrorUncallableMethod</li><li class="success">phpunit\Error::testErrorParamError</li><li class="success">phpunit\Error::testErrorModuleError</li><li class="success">phpunit\Error::testErrorUnknownRepo</li><li class="success">phpunit\Error::testErrorRepoError</li><li class="success">phpunit\Error::testErrorPDOConnection</li><li class="success">phpunit\Error::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="83"></a><a href="#83">83</a></div></td><td class="codeLine"> case self::UnknownRepo: return "Le repo n'existe pas"; break;</td></tr>
|
||||||
<tr class="success popin" data-title="7 tests cover line 84" data-content="<ul><li class="success">phpunit\ManagerError::testErrorUnknownMethod</li><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="84"></a><a href="#84">84</a></div></td><td class="codeLine"> case self::UnknownMethod: return "Le methode n'existe pas"; break;</td></tr>
|
<tr class="success popin" data-title="7 tests cover line 84" data-content="<ul><li class="success">phpunit\Error::testErrorUnknownMethod</li><li class="success">phpunit\Error::testErrorUncallableMethod</li><li class="success">phpunit\Error::testErrorParamError</li><li class="success">phpunit\Error::testErrorModuleError</li><li class="success">phpunit\Error::testErrorRepoError</li><li class="success">phpunit\Error::testErrorPDOConnection</li><li class="success">phpunit\Error::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="84"></a><a href="#84">84</a></div></td><td class="codeLine"> case self::UnknownMethod: return "Le methode n'existe pas"; break;</td></tr>
|
||||||
<tr class="success popin" data-title="6 tests cover line 85" data-content="<ul><li class="success">phpunit\ManagerError::testErrorUncallableMethod</li><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="85"></a><a href="#85">85</a></div></td><td class="codeLine"> case self::UncallableMethod: return "Le methode n'est pas amorcable"; break;</td></tr>
|
<tr class="success popin" data-title="6 tests cover line 85" data-content="<ul><li class="success">phpunit\Error::testErrorUncallableMethod</li><li class="success">phpunit\Error::testErrorParamError</li><li class="success">phpunit\Error::testErrorModuleError</li><li class="success">phpunit\Error::testErrorRepoError</li><li class="success">phpunit\Error::testErrorPDOConnection</li><li class="success">phpunit\Error::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="85"></a><a href="#85">85</a></div></td><td class="codeLine"> case self::UncallableMethod: return "Le methode n'est pas amorcable"; break;</td></tr>
|
||||||
<tr><td><div align="right"><a name="86"></a><a href="#86">86</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="86"></a><a href="#86">86</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr class="success popin" data-title="5 tests cover line 87" data-content="<ul><li class="success">phpunit\ManagerError::testErrorParamError</li><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="87"></a><a href="#87">87</a></div></td><td class="codeLine"> case self::ParamError: return "Un ou plusieurs parametres sont manquants ou incorrects"; break;</td></tr>
|
<tr class="success popin" data-title="5 tests cover line 87" data-content="<ul><li class="success">phpunit\Error::testErrorParamError</li><li class="success">phpunit\Error::testErrorModuleError</li><li class="success">phpunit\Error::testErrorRepoError</li><li class="success">phpunit\Error::testErrorPDOConnection</li><li class="success">phpunit\Error::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="87"></a><a href="#87">87</a></div></td><td class="codeLine"> case self::ParamError: return "Un ou plusieurs parametres sont manquants ou incorrects"; break;</td></tr>
|
||||||
<tr class="success popin" data-title="4 tests cover line 88" data-content="<ul><li class="success">phpunit\ManagerError::testErrorModuleError</li><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="88"></a><a href="#88">88</a></div></td><td class="codeLine"> case self::ModuleError: return "Erreur lors du traitement du module"; break;</td></tr>
|
<tr class="success popin" data-title="4 tests cover line 88" data-content="<ul><li class="success">phpunit\Error::testErrorModuleError</li><li class="success">phpunit\Error::testErrorRepoError</li><li class="success">phpunit\Error::testErrorPDOConnection</li><li class="success">phpunit\Error::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="88"></a><a href="#88">88</a></div></td><td class="codeLine"> case self::ModuleError: return "Erreur lors du traitement du module"; break;</td></tr>
|
||||||
<tr class="success popin" data-title="3 tests cover line 89" data-content="<ul><li class="success">phpunit\ManagerError::testErrorRepoError</li><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="89"></a><a href="#89">89</a></div></td><td class="codeLine"> case self::RepoError: return "Erreur lors du traitement du repo"; break;</td></tr>
|
<tr class="success popin" data-title="3 tests cover line 89" data-content="<ul><li class="success">phpunit\Error::testErrorRepoError</li><li class="success">phpunit\Error::testErrorPDOConnection</li><li class="success">phpunit\Error::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="89"></a><a href="#89">89</a></div></td><td class="codeLine"> case self::RepoError: return "Erreur lors du traitement du repo"; break;</td></tr>
|
||||||
<tr><td><div align="right"><a name="90"></a><a href="#90">90</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="90"></a><a href="#90">90</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr class="success popin" data-title="2 tests cover line 91" data-content="<ul><li class="success">phpunit\ManagerError::testErrorPDOConnection</li><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="91"></a><a href="#91">91</a></div></td><td class="codeLine"> case self::PDOConnection: return "La connexion avec la base de donnees a echoue"; break;</td></tr>
|
<tr class="success popin" data-title="2 tests cover line 91" data-content="<ul><li class="success">phpunit\Error::testErrorPDOConnection</li><li class="success">phpunit\Error::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="91"></a><a href="#91">91</a></div></td><td class="codeLine"> case self::PDOConnection: return "La connexion avec la base de donnees a echoue"; break;</td></tr>
|
||||||
<tr><td><div align="right"><a name="92"></a><a href="#92">92</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="92"></a><a href="#92">92</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="93"></a><a href="#93">93</a></div></td><td class="codeLine"> // default: return "Erreur inconnue..."; break;</td></tr>
|
<tr><td><div align="right"><a name="93"></a><a href="#93">93</a></div></td><td class="codeLine"> // default: return "Erreur inconnue..."; break;</td></tr>
|
||||||
<tr><td><div align="right"><a name="94"></a><a href="#94">94</a></div></td><td class="codeLine"> }</td></tr>
|
<tr><td><div align="right"><a name="94"></a><a href="#94">94</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
<tr><td><div align="right"><a name="95"></a><a href="#95">95</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="95"></a><a href="#95">95</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="96"></a><a href="#96">96</a></div></td><td class="codeLine"> // Erreur inconnue</td></tr>
|
<tr><td><div align="right"><a name="96"></a><a href="#96">96</a></div></td><td class="codeLine"> // Erreur inconnue</td></tr>
|
||||||
<tr class="success popin" data-title="1 test covers line 97" data-content="<ul><li class="success">phpunit\ManagerError::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="97"></a><a href="#97">97</a></div></td><td class="codeLine"> return null;</td></tr>
|
<tr class="success popin" data-title="1 test covers line 97" data-content="<ul><li class="success">phpunit\Error::testErrorNotKnown</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="97"></a><a href="#97">97</a></div></td><td class="codeLine"> return null;</td></tr>
|
||||||
<tr><td><div align="right"><a name="98"></a><a href="#98">98</a></div></td><td class="codeLine"> }</td></tr>
|
<tr><td><div align="right"><a name="98"></a><a href="#98">98</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
<tr><td><div align="right"><a name="99"></a><a href="#99">99</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="99"></a><a href="#99">99</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="100"></a><a href="#100">100</a></div></td><td class="codeLine"> }</td></tr>
|
<tr><td><div align="right"><a name="100"></a><a href="#100">100</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
|
|
|
@ -223,7 +223,7 @@
|
||||||
<tr><td><div align="right"><a name="28"></a><a href="#28">28</a></div></td><td class="codeLine"> *</td></tr>
|
<tr><td><div align="right"><a name="28"></a><a href="#28">28</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
<tr><td><div align="right"><a name="29"></a><a href="#29">29</a></div></td><td class="codeLine"> */</td></tr>
|
<tr><td><div align="right"><a name="29"></a><a href="#29">29</a></div></td><td class="codeLine"> */</td></tr>
|
||||||
<tr><td><div align="right"><a name="30"></a><a href="#30">30</a></div></td><td class="codeLine"> public function __construct($url, $view=false){</td></tr>
|
<tr><td><div align="right"><a name="30"></a><a href="#30">30</a></div></td><td class="codeLine"> public function __construct($url, $view=false){</td></tr>
|
||||||
<tr class="success popin" data-title="4 tests cover line 31" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="31"></a><a href="#31">31</a></div></td><td class="codeLine"> $this->error = ManagerError::Success;</td></tr>
|
<tr class="success popin" data-title="4 tests cover line 31" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="31"></a><a href="#31">31</a></div></td><td class="codeLine"> $this->error = Error::Success;</td></tr>
|
||||||
<tr><td><div align="right"><a name="32"></a><a href="#32">32</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="32"></a><a href="#32">32</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="33"></a><a href="#33">33</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="33"></a><a href="#33">33</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="34"></a><a href="#34">34</a></div></td><td class="codeLine"> /* [0] On met a jour la configuration</td></tr>
|
<tr><td><div align="right"><a name="34"></a><a href="#34">34</a></div></td><td class="codeLine"> /* [0] On met a jour la configuration</td></tr>
|
||||||
|
@ -233,7 +233,7 @@
|
||||||
<tr><td><div align="right"><a name="38"></a><a href="#38">38</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="38"></a><a href="#38">38</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="39"></a><a href="#39">39</a></div></td><td class="codeLine"> // Gestion de l'erreur de parsage</td></tr>
|
<tr><td><div align="right"><a name="39"></a><a href="#39">39</a></div></td><td class="codeLine"> // Gestion de l'erreur de parsage</td></tr>
|
||||||
<tr class="success popin" data-title="4 tests cover line 40" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="40"></a><a href="#40">40</a></div></td><td class="codeLine"> if( $extensions_conf == null ){</td></tr>
|
<tr class="success popin" data-title="4 tests cover line 40" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="40"></a><a href="#40">40</a></div></td><td class="codeLine"> if( $extensions_conf == null ){</td></tr>
|
||||||
<tr class="danger"><td><div align="right"><a name="41"></a><a href="#41">41</a></div></td><td class="codeLine"> $this->error = ManagerError::ParsingFailed;</td></tr>
|
<tr class="danger"><td><div align="right"><a name="41"></a><a href="#41">41</a></div></td><td class="codeLine"> $this->error = Error::ParsingFailed;</td></tr>
|
||||||
<tr class="danger"><td><div align="right"><a name="42"></a><a href="#42">42</a></div></td><td class="codeLine"> return false;</td></tr>
|
<tr class="danger"><td><div align="right"><a name="42"></a><a href="#42">42</a></div></td><td class="codeLine"> return false;</td></tr>
|
||||||
<tr><td><div align="right"><a name="43"></a><a href="#43">43</a></div></td><td class="codeLine"> }</td></tr>
|
<tr><td><div align="right"><a name="43"></a><a href="#43">43</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
<tr><td><div align="right"><a name="44"></a><a href="#44">44</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="44"></a><a href="#44">44</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
@ -244,7 +244,7 @@
|
||||||
<tr><td><div align="right"><a name="49"></a><a href="#49">49</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="49"></a><a href="#49">49</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="50"></a><a href="#50">50</a></div></td><td class="codeLine"> // Gestion de l'erreur de parsage</td></tr>
|
<tr><td><div align="right"><a name="50"></a><a href="#50">50</a></div></td><td class="codeLine"> // Gestion de l'erreur de parsage</td></tr>
|
||||||
<tr class="success popin" data-title="4 tests cover line 51" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="51"></a><a href="#51">51</a></div></td><td class="codeLine"> if( $parents_conf == null ){</td></tr>
|
<tr class="success popin" data-title="4 tests cover line 51" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="51"></a><a href="#51">51</a></div></td><td class="codeLine"> if( $parents_conf == null ){</td></tr>
|
||||||
<tr class="danger"><td><div align="right"><a name="52"></a><a href="#52">52</a></div></td><td class="codeLine"> $this->error = ManagerError::ParsingFailed;</td></tr>
|
<tr class="danger"><td><div align="right"><a name="52"></a><a href="#52">52</a></div></td><td class="codeLine"> $this->error = Error::ParsingFailed;</td></tr>
|
||||||
<tr class="danger"><td><div align="right"><a name="53"></a><a href="#53">53</a></div></td><td class="codeLine"> return false;</td></tr>
|
<tr class="danger"><td><div align="right"><a name="53"></a><a href="#53">53</a></div></td><td class="codeLine"> return false;</td></tr>
|
||||||
<tr><td><div align="right"><a name="54"></a><a href="#54">54</a></div></td><td class="codeLine"> }</td></tr>
|
<tr><td><div align="right"><a name="54"></a><a href="#54">54</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
<tr><td><div align="right"><a name="55"></a><a href="#55">55</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="55"></a><a href="#55">55</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
@ -259,7 +259,7 @@
|
||||||
<tr><td><div align="right"><a name="64"></a><a href="#64">64</a></div></td><td class="codeLine"> /* [2] On check/cree les drapeaux avec ces donnees</td></tr>
|
<tr><td><div align="right"><a name="64"></a><a href="#64">64</a></div></td><td class="codeLine"> /* [2] On check/cree les drapeaux avec ces donnees</td></tr>
|
||||||
<tr><td><div align="right"><a name="65"></a><a href="#65">65</a></div></td><td class="codeLine"> ==================================================*/</td></tr>
|
<tr><td><div align="right"><a name="65"></a><a href="#65">65</a></div></td><td class="codeLine"> ==================================================*/</td></tr>
|
||||||
<tr class="success popin" data-title="4 tests cover line 66" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="66"></a><a href="#66">66</a></div></td><td class="codeLine"> if( !$this->createFlags($serialFlags) ){ // Creation des drapeaux</td></tr>
|
<tr class="success popin" data-title="4 tests cover line 66" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="66"></a><a href="#66">66</a></div></td><td class="codeLine"> if( !$this->createFlags($serialFlags) ){ // Creation des drapeaux</td></tr>
|
||||||
<tr class="danger"><td><div align="right"><a name="67"></a><a href="#67">67</a></div></td><td class="codeLine"> $this->error = ManagerError::InvalidFlags;</td></tr>
|
<tr class="danger"><td><div align="right"><a name="67"></a><a href="#67">67</a></div></td><td class="codeLine"> $this->error = Error::InvalidFlags;</td></tr>
|
||||||
<tr class="danger"><td><div align="right"><a name="68"></a><a href="#68">68</a></div></td><td class="codeLine"> return false;</td></tr>
|
<tr class="danger"><td><div align="right"><a name="68"></a><a href="#68">68</a></div></td><td class="codeLine"> return false;</td></tr>
|
||||||
<tr><td><div align="right"><a name="69"></a><a href="#69">69</a></div></td><td class="codeLine"> }</td></tr>
|
<tr><td><div align="right"><a name="69"></a><a href="#69">69</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
<tr><td><div align="right"><a name="70"></a><a href="#70">70</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="70"></a><a href="#70">70</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
@ -267,7 +267,7 @@
|
||||||
<tr><td><div align="right"><a name="72"></a><a href="#72">72</a></div></td><td class="codeLine"> /* [3] On construit le chemin a partir des tags</td></tr>
|
<tr><td><div align="right"><a name="72"></a><a href="#72">72</a></div></td><td class="codeLine"> /* [3] On construit le chemin a partir des tags</td></tr>
|
||||||
<tr><td><div align="right"><a name="73"></a><a href="#73">73</a></div></td><td class="codeLine"> ==================================================*/</td></tr>
|
<tr><td><div align="right"><a name="73"></a><a href="#73">73</a></div></td><td class="codeLine"> ==================================================*/</td></tr>
|
||||||
<tr class="success popin" data-title="4 tests cover line 74" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="74"></a><a href="#74">74</a></div></td><td class="codeLine"> if( !$this->buildPath() ){ // Construction du chemin</td></tr>
|
<tr class="success popin" data-title="4 tests cover line 74" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="74"></a><a href="#74">74</a></div></td><td class="codeLine"> if( !$this->buildPath() ){ // Construction du chemin</td></tr>
|
||||||
<tr class="danger"><td><div align="right"><a name="75"></a><a href="#75">75</a></div></td><td class="codeLine"> $this->error = ManagerError::UnreachableResource;</td></tr>
|
<tr class="danger"><td><div align="right"><a name="75"></a><a href="#75">75</a></div></td><td class="codeLine"> $this->error = Error::UnreachableResource;</td></tr>
|
||||||
<tr class="danger"><td><div align="right"><a name="76"></a><a href="#76">76</a></div></td><td class="codeLine"> return false;</td></tr>
|
<tr class="danger"><td><div align="right"><a name="76"></a><a href="#76">76</a></div></td><td class="codeLine"> return false;</td></tr>
|
||||||
<tr><td><div align="right"><a name="77"></a><a href="#77">77</a></div></td><td class="codeLine"> }</td></tr>
|
<tr><td><div align="right"><a name="77"></a><a href="#77">77</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
<tr><td><div align="right"><a name="78"></a><a href="#78">78</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="78"></a><a href="#78">78</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
@ -410,7 +410,7 @@
|
||||||
<tr><td><div align="right"><a name="215"></a><a href="#215">215</a></div></td><td class="codeLine"> */</td></tr>
|
<tr><td><div align="right"><a name="215"></a><a href="#215">215</a></div></td><td class="codeLine"> */</td></tr>
|
||||||
<tr><td><div align="right"><a name="216"></a><a href="#216">216</a></div></td><td class="codeLine"> public function view(){</td></tr>
|
<tr><td><div align="right"><a name="216"></a><a href="#216">216</a></div></td><td class="codeLine"> public function view(){</td></tr>
|
||||||
<tr><td><div align="right"><a name="217"></a><a href="#217">217</a></div></td><td class="codeLine"> // S'il y a eu une erreur en amont</td></tr>
|
<tr><td><div align="right"><a name="217"></a><a href="#217">217</a></div></td><td class="codeLine"> // S'il y a eu une erreur en amont</td></tr>
|
||||||
<tr class="danger"><td><div align="right"><a name="218"></a><a href="#218">218</a></div></td><td class="codeLine"> if( $this->error != ManagerError::Success )</td></tr>
|
<tr class="danger"><td><div align="right"><a name="218"></a><a href="#218">218</a></div></td><td class="codeLine"> if( $this->error != Error::Success )</td></tr>
|
||||||
<tr class="danger"><td><div align="right"><a name="219"></a><a href="#219">219</a></div></td><td class="codeLine"> return false; // on retourne faux</td></tr>
|
<tr class="danger"><td><div align="right"><a name="219"></a><a href="#219">219</a></div></td><td class="codeLine"> return false; // on retourne faux</td></tr>
|
||||||
<tr><td><div align="right"><a name="220"></a><a href="#220">220</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="220"></a><a href="#220">220</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="221"></a><a href="#221">221</a></div></td><td class="codeLine"> // On definit le header</td></tr>
|
<tr><td><div align="right"><a name="221"></a><a href="#221">221</a></div></td><td class="codeLine"> // On definit le header</td></tr>
|
||||||
|
@ -427,7 +427,7 @@
|
||||||
<tr><td><div align="right"><a name="232"></a><a href="#232">232</a></div></td><td class="codeLine"> */</td></tr>
|
<tr><td><div align="right"><a name="232"></a><a href="#232">232</a></div></td><td class="codeLine"> */</td></tr>
|
||||||
<tr><td><div align="right"><a name="233"></a><a href="#233">233</a></div></td><td class="codeLine"> public function getContent(){</td></tr>
|
<tr><td><div align="right"><a name="233"></a><a href="#233">233</a></div></td><td class="codeLine"> public function getContent(){</td></tr>
|
||||||
<tr><td><div align="right"><a name="234"></a><a href="#234">234</a></div></td><td class="codeLine"> // S'il y a eu une erreur en amont</td></tr>
|
<tr><td><div align="right"><a name="234"></a><a href="#234">234</a></div></td><td class="codeLine"> // S'il y a eu une erreur en amont</td></tr>
|
||||||
<tr class="success popin" data-title="4 tests cover line 235" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="235"></a><a href="#235">235</a></div></td><td class="codeLine"> if( $this->error != ManagerError::Success )</td></tr>
|
<tr class="success popin" data-title="4 tests cover line 235" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="235"></a><a href="#235">235</a></div></td><td class="codeLine"> if( $this->error != Error::Success )</td></tr>
|
||||||
<tr class="success popin" data-title="4 tests cover line 236" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="236"></a><a href="#236">236</a></div></td><td class="codeLine"> return false; // on retourne faux</td></tr>
|
<tr class="success popin" data-title="4 tests cover line 236" data-content="<ul><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testGetInstanceWithSERVERLocal</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="236"></a><a href="#236">236</a></div></td><td class="codeLine"> return false; // on retourne faux</td></tr>
|
||||||
<tr><td><div align="right"><a name="237"></a><a href="#237">237</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="237"></a><a href="#237">237</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="238"></a><a href="#238">238</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="238"></a><a href="#238">238</a></div></td><td class="codeLine"></td></tr>
|
||||||
|
|
|
@ -165,19 +165,19 @@
|
||||||
<tr><td><div align="right"><a name="50"></a><a href="#50">50</a></div></td><td class="codeLine"> *</td></tr>
|
<tr><td><div align="right"><a name="50"></a><a href="#50">50</a></div></td><td class="codeLine"> *</td></tr>
|
||||||
<tr><td><div align="right"><a name="51"></a><a href="#51">51</a></div></td><td class="codeLine"> */</td></tr>
|
<tr><td><div align="right"><a name="51"></a><a href="#51">51</a></div></td><td class="codeLine"> */</td></tr>
|
||||||
<tr><td><div align="right"><a name="52"></a><a href="#52">52</a></div></td><td class="codeLine"> function autoloader($className){</td></tr>
|
<tr><td><div align="right"><a name="52"></a><a href="#52">52</a></div></td><td class="codeLine"> function autoloader($className){</td></tr>
|
||||||
<tr class="success popin" data-title="12 tests cover line 53" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\ManagerError::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="53"></a><a href="#53">53</a></div></td><td class="codeLine"> $path = '';</td></tr>
|
<tr class="success popin" data-title="12 tests cover line 53" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Error::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="53"></a><a href="#53">53</a></div></td><td class="codeLine"> $path = '';</td></tr>
|
||||||
<tr><td><div align="right"><a name="54"></a><a href="#54">54</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="54"></a><a href="#54">54</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="55"></a><a href="#55">55</a></div></td><td class="codeLine"> /* [1] On utilise le namespace pour localiser</td></tr>
|
<tr><td><div align="right"><a name="55"></a><a href="#55">55</a></div></td><td class="codeLine"> /* [1] On utilise le namespace pour localiser</td></tr>
|
||||||
<tr><td><div align="right"><a name="56"></a><a href="#56">56</a></div></td><td class="codeLine"> ===============================================*/</td></tr>
|
<tr><td><div align="right"><a name="56"></a><a href="#56">56</a></div></td><td class="codeLine"> ===============================================*/</td></tr>
|
||||||
<tr><td><div align="right"><a name="57"></a><a href="#57">57</a></div></td><td class="codeLine"> // On remplace les '\' par des '/'</td></tr>
|
<tr><td><div align="right"><a name="57"></a><a href="#57">57</a></div></td><td class="codeLine"> // On remplace les '\' par des '/'</td></tr>
|
||||||
<tr class="success popin" data-title="12 tests cover line 58" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\ManagerError::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="58"></a><a href="#58">58</a></div></td><td class="codeLine"> $path = str_replace('\\', '/', $className) . '.php';</td></tr>
|
<tr class="success popin" data-title="12 tests cover line 58" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Error::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="58"></a><a href="#58">58</a></div></td><td class="codeLine"> $path = str_replace('\\', '/', $className) . '.php';</td></tr>
|
||||||
<tr class="success popin" data-title="12 tests cover line 59" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\ManagerError::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="59"></a><a href="#59">59</a></div></td><td class="codeLine"> $path = __ROOT__.'/'.$path;</td></tr>
|
<tr class="success popin" data-title="12 tests cover line 59" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Error::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="59"></a><a href="#59">59</a></div></td><td class="codeLine"> $path = __ROOT__.'/'.$path;</td></tr>
|
||||||
<tr><td><div align="right"><a name="60"></a><a href="#60">60</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="60"></a><a href="#60">60</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="61"></a><a href="#61">61</a></div></td><td class="codeLine"> // Si le fichier existe</td></tr>
|
<tr><td><div align="right"><a name="61"></a><a href="#61">61</a></div></td><td class="codeLine"> // Si le fichier existe</td></tr>
|
||||||
<tr class="success popin" data-title="12 tests cover line 62" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\ManagerError::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="62"></a><a href="#62">62</a></div></td><td class="codeLine"> if( file_exists($path) )</td></tr>
|
<tr class="success popin" data-title="12 tests cover line 62" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Error::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="62"></a><a href="#62">62</a></div></td><td class="codeLine"> if( file_exists($path) )</td></tr>
|
||||||
<tr class="success popin" data-title="12 tests cover line 63" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\ManagerError::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="63"></a><a href="#63">63</a></div></td><td class="codeLine"> require_once $path; // on inclue le fichier</td></tr>
|
<tr class="success popin" data-title="12 tests cover line 63" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Error::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="63"></a><a href="#63">63</a></div></td><td class="codeLine"> require_once $path; // on inclue le fichier</td></tr>
|
||||||
<tr><td><div align="right"><a name="64"></a><a href="#64">64</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="64"></a><a href="#64">64</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr class="success popin" data-title="12 tests cover line 65" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\ManagerError::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="65"></a><a href="#65">65</a></div></td><td class="codeLine"> }</td></tr>
|
<tr class="success popin" data-title="12 tests cover line 65" data-content="<ul><li class="success">phpunit\Database_check::testAutoIncrementSizeInfCorrect</li><li class="success">phpunit\Database_check::testAutoIncrementSizeLtInfIncorrect</li><li class="success">phpunit\Database_check::testUsernameSize3Correct</li><li class="success">phpunit\Database_check::testUsernameSizeLt3Incorrect</li><li class="success">phpunit\Database_check::testUsernameSizeGt30Incorrect</li><li class="success">phpunit\Database_check::testMailSizeEqCorrect</li><li class="success">phpunit\Database_check::testPasswordContentIncorrect</li><li class="success">phpunit\Database_construct::testGetInstanceWithNoSERVER</li><li class="success">phpunit\Database_construct::testInstancePersistence</li><li class="success">phpunit\Database_construct::testInstancePersistenceRefutation</li><li class="success">phpunit\Database_delNumeric::testGlobal2Dim</li><li class="success">phpunit\Error::testErrorSuccess</li></ul>" data-placement="bottom" data-html="true"><td><div align="right"><a name="65"></a><a href="#65">65</a></div></td><td class="codeLine"> }</td></tr>
|
||||||
<tr><td><div align="right"><a name="66"></a><a href="#66">66</a></div></td><td class="codeLine"></td></tr>
|
<tr><td><div align="right"><a name="66"></a><a href="#66">66</a></div></td><td class="codeLine"></td></tr>
|
||||||
<tr><td><div align="right"><a name="67"></a><a href="#67">67</a></div></td><td class="codeLine"> // On definit l'autoloader comme autoloader (obvious)</td></tr>
|
<tr><td><div align="right"><a name="67"></a><a href="#67">67</a></div></td><td class="codeLine"> // On definit l'autoloader comme autoloader (obvious)</td></tr>
|
||||||
<tr><td><div align="right"><a name="68"></a><a href="#68">68</a></div></td><td class="codeLine"> spl_autoload_register('autoloader', false, true);</td></tr>
|
<tr><td><div align="right"><a name="68"></a><a href="#68">68</a></div></td><td class="codeLine"> spl_autoload_register('autoloader', false, true);</td></tr>
|
||||||
|
|
|
@ -118,7 +118,7 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
series: [{
|
series: [{
|
||||||
data: [[95.454545454545,54,"<a href=\"Database.php.html#6\">DataBase<\/a>"],[100,16,"<a href=\"ManagerError.php.html#7\">ManagerError<\/a>"],[75.925925925926,24,"<a href=\"ResourceDispatcher.php.html#6\">ResourceDispatcher<\/a>"],[100,11,"<a href=\"sessionManager.php.html#6\">sessionManager<\/a>"]],
|
data: [[95.454545454545,54,"<a href=\"Database.php.html#6\">DataBase<\/a>"],[100,16,"<a href=\"Error.php.html#7\">Error<\/a>"],[75.925925925926,24,"<a href=\"ResourceDispatcher.php.html#6\">ResourceDispatcher<\/a>"],[100,11,"<a href=\"sessionManager.php.html#6\">sessionManager<\/a>"]],
|
||||||
marker: {
|
marker: {
|
||||||
symbol: 'diamond'
|
symbol: 'diamond'
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="success"><i class="icon-file"></i> <a href="ManagerError.php.html">ManagerError.php</a></td>
|
<td class="success"><i class="icon-file"></i> <a href="Error.php.html">Error.php</a></td>
|
||||||
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
<td class="success big"> <div class="progress progress-success" style="width: 100px;">
|
||||||
<div class="bar" style="width: 100.00%;"></div>
|
<div class="bar" style="width: 100.00%;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<directory prefix="Database_" suffix=".php">./tests/</directory>
|
<directory prefix="Database_" suffix=".php">./tests/</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
|
|
||||||
<testsuite name="manager/ManagerError">
|
<testsuite name="manager/Error">
|
||||||
<file>./tests/ManagerError.php</file>
|
<file>./tests/Error.php</file>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
|
|
||||||
<testsuite name="manager/sessionManager">
|
<testsuite name="manager/sessionManager">
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
public function testGetInstanceWithSERVERLocal(){
|
public function testGetInstanceWithSERVERLocal(){
|
||||||
// Pour regenerer une instance, on definit une erreur
|
// Pour regenerer une instance, on definit une erreur
|
||||||
\database\core\Database::$error = \manager\ManagerError::PDOConnection;
|
\database\core\Database::$error = \error\core\Error::PDOConnection;
|
||||||
|
|
||||||
|
|
||||||
$instance = \database\core\Database::getInstance();
|
$instance = \database\core\Database::getInstance();
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
/* [2] Verification du singleton (getInstance)
|
/* [2] Verification du singleton (getInstance)
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
public function testInstancePersistence(){
|
public function testInstancePersistence(){
|
||||||
\database\core\Database::$error = \manager\ManagerError::PDOConnection;
|
\database\core\Database::$error = \error\core\Error::PDOConnection;
|
||||||
|
|
||||||
$instance_construct = \database\core\Database::getInstance();
|
$instance_construct = \database\core\Database::getInstance();
|
||||||
$instance_nextuse = \database\core\Database::getInstance();
|
$instance_nextuse = \database\core\Database::getInstance();
|
||||||
|
@ -34,10 +34,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testInstancePersistenceRefutation(){
|
public function testInstancePersistenceRefutation(){
|
||||||
\database\core\Database::$error = \manager\ManagerError::PDOConnection;
|
\database\core\Database::$error = \error\core\Error::PDOConnection;
|
||||||
$instance_construct = \database\core\Database::getInstance();
|
$instance_construct = \database\core\Database::getInstance();
|
||||||
|
|
||||||
\database\core\Database::$error = \manager\ManagerError::PDOConnection;
|
\database\core\Database::$error = \error\core\Error::PDOConnection;
|
||||||
$instance_nextuse = \database\core\Database::getInstance();
|
$instance_nextuse = \database\core\Database::getInstance();
|
||||||
|
|
||||||
$this->assertNotSame( $instance_construct, $instance_nextuse );
|
$this->assertNotSame( $instance_construct, $instance_nextuse );
|
||||||
|
|
|
@ -1,104 +1,104 @@
|
||||||
<?php namespace phpunit;
|
<?php namespace phpunit;
|
||||||
|
|
||||||
class ManagerError extends \PHPUnit_Framework_TestCase{
|
class Error extends \PHPUnit_Framework_TestCase{
|
||||||
|
|
||||||
/* [1] Test de toutes les erreurs
|
/* [1] Test de toutes les erreurs
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
public function testErrorSuccess(){
|
public function testErrorSuccess(){
|
||||||
$error = \manager\ManagerError::Success;
|
$error = \error\core\Error::Success;
|
||||||
|
|
||||||
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testErrorParsingFailed(){
|
public function testErrorParsingFailed(){
|
||||||
$error = \manager\ManagerError::ParsingFailed;
|
$error = \error\core\Error::ParsingFailed;
|
||||||
|
|
||||||
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testErrorInvalidFlags(){
|
public function testErrorInvalidFlags(){
|
||||||
$error = \manager\ManagerError::InvalidFlags;
|
$error = \error\core\Error::InvalidFlags;
|
||||||
|
|
||||||
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testErrorUnreachableResource(){
|
public function testErrorUnreachableResource(){
|
||||||
$error = \manager\ManagerError::UnreachableResource;
|
$error = \error\core\Error::UnreachableResource;
|
||||||
|
|
||||||
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testErrorMissingPath(){
|
public function testErrorMissingPath(){
|
||||||
$error = \manager\ManagerError::MissingPath;
|
$error = \error\core\Error::MissingPath;
|
||||||
|
|
||||||
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testErrorWrongPathModule(){
|
public function testErrorWrongPathModule(){
|
||||||
$error = \manager\ManagerError::WrongPathModule;
|
$error = \error\core\Error::WrongPathModule;
|
||||||
|
|
||||||
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testErrorUnknownModule(){
|
public function testErrorUnknownModule(){
|
||||||
$error = \manager\ManagerError::UnknownModule;
|
$error = \error\core\Error::UnknownModule;
|
||||||
|
|
||||||
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testErrorUnknownMethod(){
|
public function testErrorUnknownMethod(){
|
||||||
$error = \manager\ManagerError::UnknownMethod;
|
$error = \error\core\Error::UnknownMethod;
|
||||||
|
|
||||||
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testErrorUncallableMethod(){
|
public function testErrorUncallableMethod(){
|
||||||
$error = \manager\ManagerError::UncallableMethod;
|
$error = \error\core\Error::UncallableMethod;
|
||||||
|
|
||||||
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testErrorParamError(){
|
public function testErrorParamError(){
|
||||||
$error = \manager\ManagerError::ParamError;
|
$error = \error\core\Error::ParamError;
|
||||||
|
|
||||||
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testErrorModuleError(){
|
public function testErrorModuleError(){
|
||||||
$error = \manager\ManagerError::ModuleError;
|
$error = \error\core\Error::ModuleError;
|
||||||
|
|
||||||
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testErrorWrongPathRepo(){
|
public function testErrorWrongPathRepo(){
|
||||||
$error = \manager\ManagerError::WrongPathRepo;
|
$error = \error\core\Error::WrongPathRepo;
|
||||||
|
|
||||||
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testErrorUnknownRepo(){
|
public function testErrorUnknownRepo(){
|
||||||
$error = \manager\ManagerError::UnknownRepo;
|
$error = \error\core\Error::UnknownRepo;
|
||||||
|
|
||||||
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testErrorRepoError(){
|
public function testErrorRepoError(){
|
||||||
$error = \manager\ManagerError::RepoError;
|
$error = \error\core\Error::RepoError;
|
||||||
|
|
||||||
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testErrorPDOConnection(){
|
public function testErrorPDOConnection(){
|
||||||
$error = \manager\ManagerError::PDOConnection;
|
$error = \error\core\Error::PDOConnection;
|
||||||
|
|
||||||
$this->assertNotNull( \manager\ManagerError::explicit($error) );
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function testErrorNotKnown(){
|
public function testErrorNotKnown(){
|
||||||
$error = 1239;
|
$error = 1239;
|
||||||
|
|
||||||
$this->assertNull( \manager\ManagerError::explicit($error) );
|
$this->assertNull( \error\core\Error::explicit($error) );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
use \api\core\ModuleRequest;
|
use \api\core\ModuleRequest;
|
||||||
use \api\core\ModuleResponse;
|
use \api\core\ModuleResponse;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \api\core\Authentification;
|
use \api\core\Authentification;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
use \api\core\ModuleRequest;
|
use \api\core\ModuleRequest;
|
||||||
use \manager\sessionManager;
|
use \manager\sessionManager;
|
||||||
use \manager\ResourceDispatcher;
|
use \manager\ResourceDispatcher;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \database\core\Repo;
|
use \database\core\Repo;
|
||||||
use \database\core\Database;
|
use \database\core\Database;
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
$answer = $request->dispatch();
|
$answer = $request->dispatch();
|
||||||
|
|
||||||
// Debug error
|
// Debug error
|
||||||
if( $answer->error != ManagerError::Success )
|
if( $answer->error != Error::Success )
|
||||||
var_dump( $answer->error );
|
var_dump( $answer->error );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
$answer = $request->dispatch();
|
$answer = $request->dispatch();
|
||||||
|
|
||||||
// Debug error
|
// Debug error
|
||||||
if( $answer->error != ManagerError::Success )
|
if( $answer->error != Error::Success )
|
||||||
var_dump( $answer->error );
|
var_dump( $answer->error );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
$requete = new ModuleRequest('userDefault/getAll');
|
$requete = new ModuleRequest('userDefault/getAll');
|
||||||
$answer = $requete->dispatch();
|
$answer = $requete->dispatch();
|
||||||
|
|
||||||
var_dump( ManagerError::explicit($answer->error) );
|
var_dump( Error::explicit($answer->error) );
|
||||||
var_dump( $answer->get('users') );
|
var_dump( $answer->get('users') );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
$requete = new ModuleRequest('machineDefault/getAll');
|
$requete = new ModuleRequest('machineDefault/getAll');
|
||||||
$answer = $requete->dispatch();
|
$answer = $requete->dispatch();
|
||||||
|
|
||||||
var_dump( ManagerError::explicit($answer->error) );
|
var_dump( Error::explicit($answer->error) );
|
||||||
var_dump( $answer->get('machines') );
|
var_dump( $answer->get('machines') );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -157,8 +157,8 @@
|
||||||
$answer = $request->dispatch();
|
$answer = $request->dispatch();
|
||||||
|
|
||||||
// Debug error
|
// Debug error
|
||||||
if( $answer->error != ManagerError::Success )
|
if( $answer->error != Error::Success )
|
||||||
var_dump( ManagerError::explicit($answer->error) );
|
var_dump( Error::explicit($answer->error) );
|
||||||
|
|
||||||
// display result
|
// display result
|
||||||
var_dump( $answer->getAll() );
|
var_dump( $answer->getAll() );
|
||||||
|
@ -209,8 +209,8 @@
|
||||||
// $req1 = new Repo('user/getByCode', array('92-55-B9-B3'));
|
// $req1 = new Repo('user/getByCode', array('92-55-B9-B3'));
|
||||||
var_dump( $req1->answer() );
|
var_dump( $req1->answer() );
|
||||||
|
|
||||||
if( $req1->error != ManagerError::Success )
|
if( $req1->error != Error::Success )
|
||||||
var_dump( ManagerError::explicit($req1->error) );
|
var_dump( Error::explicit($req1->error) );
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -234,8 +234,8 @@
|
||||||
$request = new ModuleRequest('userDefault/create', ['92-55-B9-B1', 'b', 'bla', 'bla', 'bla@test.com', 'sadas', '1'] );
|
$request = new ModuleRequest('userDefault/create', ['92-55-B9-B1', 'b', 'bla', 'bla', 'bla@test.com', 'sadas', '1'] );
|
||||||
$answer = $request->dispatch();
|
$answer = $request->dispatch();
|
||||||
// Debug error
|
// Debug error
|
||||||
if( $answer->error != ManagerError::Success )
|
if( $answer->error != Error::Success )
|
||||||
var_dump( ManagerError::explicit($answer->error) );
|
var_dump( Error::explicit($answer->error) );
|
||||||
|
|
||||||
var_dump( $answer->getAll() );
|
var_dump( $answer->getAll() );
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php namespace test\client;
|
<?php namespace test\client;
|
||||||
|
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
|
|
||||||
/* CLASSE PERMETANT L'UTILISATION DU manifest.json POUR UTILISER DES APIS DIVERSES
|
/* CLASSE PERMETANT L'UTILISATION DU manifest.json POUR UTILISER DES APIS DIVERSES
|
||||||
*
|
*
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
// Si erreur de parsage ou de fichier, on retourne une erreur
|
// Si erreur de parsage ou de fichier, on retourne une erreur
|
||||||
if( $manifest === null ){
|
if( $manifest === null ){
|
||||||
$this->error = ManagerError::ParsingFailed;
|
$this->error = Error::ParsingFailed;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php define('__ROOT__', dirname(dirname(dirname(__FILE__))) );
|
<?php define('__ROOT__', dirname(dirname(dirname(__FILE__))) );
|
||||||
require_once __ROOT__.'/autoloader.php';
|
require_once __ROOT__.'/autoloader.php';
|
||||||
use \api\core\ModuleRequest;
|
use \api\core\ModuleRequest;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \orm\core\Table;
|
use \orm\core\Table;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
require_once __ROOT__.'/autoloader.php';
|
require_once __ROOT__.'/autoloader.php';
|
||||||
use \viewer\core\Viewer;
|
use \viewer\core\Viewer;
|
||||||
use \api\core\ModuleRequest;
|
use \api\core\ModuleRequest;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \database\core\Repo;
|
use \database\core\Repo;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php define('__ROOT__', dirname(dirname(dirname(__FILE__))) );
|
<?php define('__ROOT__', dirname(dirname(dirname(__FILE__))) );
|
||||||
require_once __ROOT__.'/autoloader.php';
|
require_once __ROOT__.'/autoloader.php';
|
||||||
use \api\core\ModuleRequest;
|
use \api\core\ModuleRequest;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \database\core\Database;
|
use \database\core\Database;
|
||||||
use \database\core\Repo;
|
use \database\core\Repo;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
require_once __ROOT__.'/autoloader.php';
|
require_once __ROOT__.'/autoloader.php';
|
||||||
use \viewer\core\Viewer;
|
use \viewer\core\Viewer;
|
||||||
use \api\core\ModuleRequest;
|
use \api\core\ModuleRequest;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \database\core\Repo;
|
use \database\core\Repo;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php define('__ROOT__', dirname(dirname(dirname(__FILE__))) );
|
<?php define('__ROOT__', dirname(dirname(dirname(__FILE__))) );
|
||||||
require_once __ROOT__.'/autoloader.php';
|
require_once __ROOT__.'/autoloader.php';
|
||||||
use \api\core\ModuleRequest;
|
use \api\core\ModuleRequest;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php define('__ROOT__', dirname(dirname(dirname(__FILE__))) );
|
<?php define('__ROOT__', dirname(dirname(dirname(__FILE__))) );
|
||||||
require_once __ROOT__.'/autoloader.php';
|
require_once __ROOT__.'/autoloader.php';
|
||||||
use \api\core\ModuleRequest;
|
use \api\core\ModuleRequest;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- [1] Gestion du sous-menu de gauche -->
|
<!-- [1] Gestion du sous-menu de gauche -->
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php define('__ROOT__', dirname(dirname(dirname(__FILE__))) );
|
<?php define('__ROOT__', dirname(dirname(dirname(__FILE__))) );
|
||||||
require_once __ROOT__.'/autoloader.php';
|
require_once __ROOT__.'/autoloader.php';
|
||||||
use \api\core\ModuleRequest;
|
use \api\core\ModuleRequest;
|
||||||
use \manager\ManagerError;
|
use \error\core\Error;
|
||||||
use \viewer\core\Viewer;
|
use \viewer\core\Viewer;
|
||||||
use \database\core\Repo;
|
use \database\core\Repo;
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?php namespace view; ?>
|
<?php namespace view; ?>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Gestion du parc</title>
|
<title>Gestion du parc</title>
|
||||||
|
|
2
todo.md
2
todo.md
|
@ -149,7 +149,7 @@
|
||||||
- [x] [phpunit/] Install+Config phpunit
|
- [x] [phpunit/] Install+Config phpunit
|
||||||
- [x] [Database] Checker de type (types utilises dans la BDD)
|
- [x] [Database] Checker de type (types utilises dans la BDD)
|
||||||
- [x] [manager/Repo] Gestion des Repo
|
- [x] [manager/Repo] Gestion des Repo
|
||||||
- [x] [ManagerError] Correction/ajout des codes erreurs
|
- [x] [Error] Correction/ajout des codes erreurs
|
||||||
- [x] [ModuleRequest] Modification des erreurs
|
- [x] [ModuleRequest] Modification des erreurs
|
||||||
- [x] [ResourceDispatcher] Modification du gestionnaire de ressource car ne marche pas en ligne
|
- [x] [ResourceDispatcher] Modification du gestionnaire de ressource car ne marche pas en ligne
|
||||||
- [x] [css/container.css + js/action-script.js] Gestion de l'affichage de la page associee au sous-menu (.active)
|
- [x] [css/container.css + js/action-script.js] Gestion de l'affichage de la page associee au sous-menu (.active)
|
||||||
|
|
Loading…
Reference in New Issue