This commit is contained in:
Michael RICOIS 2017-02-13 14:08:23 +01:00
parent f55fa25915
commit cc4592eddd
16 changed files with 210 additions and 106 deletions

View File

@ -1,9 +1,19 @@
<?php
class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
{
public function preDispatch(Zend_Controller_Request_Abstract $request)
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function preDispatch(Zend_Controller_Request_Abstract $request)
{
Zend_Registry::get('firebug')->info('PLUGIN AUTH - START');
if (Zend_Registry::isRegistered('logger')) {
$logger = Zend_Registry::get('logger');
}
$logger->info('PLUGIN AUTH - START');
$module = $request->getModuleName();
$controller = $request->getControllerName();
@ -49,7 +59,7 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
// --- On vérifie le tout lors d'une connexion par url
if ( !empty($login) && !empty($hach) ) {
Zend_Registry::get('firebug')->info('AUTH : IPONLY');
$logger->info('AUTH : IPONLY');
// --- Mode hach
if ($mode === null) {
@ -169,6 +179,6 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
}
}
Zend_Registry::get('firebug')->info('PLUGIN AUTH - END');
$logger->info('PLUGIN AUTH - END');
}
}

View File

@ -9,7 +9,11 @@ class Application_Controller_Plugin_Cgu extends Zend_Controller_Plugin_Abstract
*/
public function preDispatch(Zend_Controller_Request_Abstract $request)
{
Zend_Registry::get('firebug')->info('PLUGIN CGU - START');
if (Zend_Registry::isRegistered('logger')) {
$logger = Zend_Registry::get('logger');
}
$logger->info('PLUGIN CGU - START');
$layout = Zend_Layout::getMVCInstance();
if ($layout->isEnabled()) {
@ -57,6 +61,6 @@ class Application_Controller_Plugin_Cgu extends Zend_Controller_Plugin_Abstract
break;
}
}
Zend_Registry::get('firebug')->info('PLUGIN CGU - END');
$logger->info('PLUGIN CGU - END');
}
}

View File

@ -9,7 +9,11 @@ class Application_Controller_Plugin_Lang extends Zend_Controller_Plugin_Abstract
*/
public function preDispatch(Zend_Controller_Request_Abstract $request)
{
Zend_Registry::get('firebug')->info('PLUGIN LANG - START');
if (Zend_Registry::isRegistered('logger')) {
$logger = Zend_Registry::get('logger');
}
$logger->info('PLUGIN LANG - START');
$auth = Zend_Auth::getInstance();
if ( $auth->hasIdentity() ) {
@ -56,6 +60,6 @@ class Application_Controller_Plugin_Lang extends Zend_Controller_Plugin_Abstract
$registry->set('Zend_Locale', $locale);
$registry->set('Zend_Translate', $translate);
Zend_Registry::get('firebug')->info('PLUGIN LANG - END');
$logger->info('PLUGIN LANG - END');
}
}

View File

@ -7,7 +7,11 @@ class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
*/
public function preDispatch(Zend_Controller_Request_Abstract $request)
{
Zend_Registry::get('firebug')->info('PLUGIN MENU - START');
if (Zend_Registry::isRegistered('logger')) {
$logger = Zend_Registry::get('logger');
}
$logger->info('PLUGIN MENU - START');
$layout = Zend_Layout::getMVCInstance();
$user = new Scores_Utilisateur();
@ -80,6 +84,6 @@ class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
//$view->aide = true;
}
Zend_Registry::get('firebug')->info('PLUGIN MENU - END');
$logger->info('PLUGIN MENU - END');
}
}

View File

@ -3,7 +3,11 @@ class Application_Controller_Plugin_Pdf extends Zend_Controller_Plugin_Abstract
{
public function dispatchLoopShutdown()
{
Zend_Registry::get('firebug')->info('PLUGIN PDF - START');
if (Zend_Registry::isRegistered('logger')) {
$logger = Zend_Registry::get('logger');
}
$logger->info('PLUGIN PDF - START');
$layout = Zend_Layout::getMVCInstance();
if ($layout->isEnabled()) {
@ -21,6 +25,6 @@ class Application_Controller_Plugin_Pdf extends Zend_Controller_Plugin_Abstract
}
}
Zend_Registry::get('firebug')->info('PLUGIN PDF - END');
$logger->info('PLUGIN PDF - END');
}
}

View File

@ -3,7 +3,11 @@ class Application_Controller_Plugin_Theme extends Zend_Controller_Plugin_Abstrac
{
public function preDispatch(Zend_Controller_Request_Abstract $request)
{
Zend_Registry::get('firebug')->info('PLUGIN THEME - START');
if (Zend_Registry::isRegistered('logger')) {
$logger = Zend_Registry::get('logger');
}
$logger->info('PLUGIN THEME - START');
$auth = Zend_Auth::getInstance();
$theme = 'default'; //$theme = 'mobile';
@ -129,6 +133,6 @@ class Application_Controller_Plugin_Theme extends Zend_Controller_Plugin_Abstrac
break;
}
Zend_Registry::get('firebug')->info('PLUGIN THEME - STOP');
$logger->info('PLUGIN THEME - STOP');
}
}

View File

@ -3,7 +3,11 @@ class Application_Controller_Plugin_Xml extends Zend_Controller_Plugin_Abstract
{
public function dispatchLoopShutdown()
{
Zend_Registry::get('firebug')->info('PLUGIN XML - START');
if (Zend_Registry::isRegistered('logger')) {
$logger = Zend_Registry::get('logger');
}
$logger->info('PLUGIN XML - START');
$layout = Zend_Layout::getMVCInstance();
if ($layout->isEnabled()) {
@ -20,6 +24,6 @@ class Application_Controller_Plugin_Xml extends Zend_Controller_Plugin_Abstract
}
}
Zend_Registry::get('firebug')->info('PLUGIN XML - END');
$logger->info('PLUGIN XML - END');
}
}

View File

@ -547,7 +547,7 @@ class Infogreffe
$bilan['mode_diffusion'][] = $mode->getAttribute('type');
}
Zend_Registry::get('firebug')->info('Bilan : '.$bilan['date_cloture'].' '.$bilan['type_comptes']);
$this->logger->info('Bilan : '.$bilan['date_cloture'].' '.$bilan['type_comptes']);
//Génération de l'index pour le tri
$date = $bilan['date_cloture_iso'];
@ -628,17 +628,17 @@ class Infogreffe
->where('date=?', $date)
->where('num=?', $acte['num_acte'])
->where('file LIKE "acte-'.$siren.'-%-'.$date.'-%-'.$depot['num_depot'].'-'.$acte['num_acte'].'.pdf"');
Zend_Registry::get('firebug')->info('Detect fichier : '.$sql->__toString());
$this->logger->info('Detect fichier : '.$sql->__toString());
$result = $actesM->fetchRow($sql);
if ( null !== $result ) {
Zend_Registry::get('firebug')->info($result);
$this->logger->info($result);
$fichier = $this->pathData.$this->actePath($ref).$result->file;
Zend_Registry::get('firebug')->info($fichier);
$this->logger->info($fichier);
if ( file_exists($fichier) )
{
Zend_Registry::get('firebug')->info($acte);
$this->logger->info($acte);
if ($result->type != $acte['type_acte'] && $result->type2 == '') {
Zend_Registry::get('firebug')->info('Update Database');
$this->logger->info('Update Database');
//Add to the database
try {
$actesM->update(array(
@ -648,7 +648,7 @@ class Infogreffe
'date_depot' => $dateDepot->toString('yyyyMMdd')
), 'id='.$result->id);
} catch (Zend_Exception $e) {
Zend_Registry::get('firebug')->info($e->getMessage());
$this->logger->info($e->getMessage());
}
} else {
try {
@ -658,7 +658,7 @@ class Infogreffe
'date_depot' => $dateDepot->toString('yyyyMMdd')
), 'id='.$result->id);
} catch (Zend_Exception $e) {
Zend_Registry::get('firebug')->info($e->getMessage());
$this->logger->info($e->getMessage());
}
}
$ref = str_replace('.pdf', '',substr($result->file,15));
@ -770,7 +770,7 @@ class Infogreffe
//Cas de fichier correspondant à la référence
$fichier = $this->pathData.$this->bilanPath($ref).$this->bilanFilename($siren,$ref);
Zend_Registry::get('firebug')->info('Fichier : '.$fichier);
$this->logger->info('Fichier : '.$fichier);
if( file_exists($fichier) && filesize($fichier)>0 )
{
$mode = 'fichier';

View File

@ -39,6 +39,12 @@ class Scores_Auth_Adapter_Ws implements Zend_Auth_Adapter_Interface
'62.210.222.34',
);
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
/**
* Authentification par WS
* @param string $username
@ -62,6 +68,10 @@ class Scores_Auth_Adapter_Ws implements Zend_Auth_Adapter_Interface
$this->_password = 'iponly:'.$ip;
$this->_checkIp = true;
}
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
}
/**
@ -85,8 +95,8 @@ class Scores_Auth_Adapter_Ws implements Zend_Auth_Adapter_Interface
$parameters->from = 'auth';
$InfosLogin = $ws->getInfosLogin($parameters);
Zend_Registry::get('firebug')->info(__CLASS__ . ' : '.__METHOD__);
Zend_Registry::get('firebug')->info($InfosLogin);
$this->logger->info(__CLASS__ . ' : '.__METHOD__);
$this->logger->info($InfosLogin);
// --- Renvoi
if ( is_string($InfosLogin) || $InfosLogin->error->errnum != 0 ) {
$message = $InfosLogin;
@ -96,12 +106,12 @@ class Scores_Auth_Adapter_Ws implements Zend_Auth_Adapter_Interface
elseif ( $InfosLogin !== false && !empty($InfosLogin->result->login)) {
$identity = new stdClass();
if ($this->_checkIp || $this->_checkHach) {
Zend_Registry::get('firebug')->info("IN");
$this->logger->info("IN");
$identity->password = $this->_password;
} else {
$identity->password = md5($InfosLogin->result->login.'|'.$this->_password);
}
Zend_Registry::get('firebug')->info($identity->password);
$this->logger->info($identity->password);
$identity->username = $InfosLogin->result->login;
$identity->email = $InfosLogin->result->email;
$identity->profil = $InfosLogin->result->profil;

View File

@ -211,12 +211,12 @@ class Scores_Google_Streetview
$response = $client->request('GET');
if ( $response->isSuccessful() ) {
if (!copy($response->getStreamName(), $this->pathImg())) {
Zend_Registry::get('firebug')->info('Erreur copie image !');
$this->logger->info('Erreur copie image !');
return false;
}
}
} catch (Zend_Http_Client_Exception $e) {
Zend_Registry::get('firebug')->info('HTTP Exception : '.$e->getMessage());
$this->logger->info('HTTP Exception : '.$e->getMessage());
return false;
}
}

View File

@ -5,6 +5,12 @@ class IdentiteProcol
protected $annonces = array();
protected $procol;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
/**
* Construit l'identite entreprise afin de retourner les éléments formatter
* pour l'affichage
@ -13,7 +19,11 @@ class IdentiteProcol
*/
public function __construct($infos)
{
$this->identite = $infos->Identite;
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
$this->identite = $infos->Identite;
$this->procol = new stdClass();
$this->procol->LibTypeEtab = $infos->LibTypeEtab;
$this->procol->StatutsConstDepot = $infos->StatutsConstDepot;
@ -39,7 +49,7 @@ class IdentiteProcol
}
}
}
Zend_Registry::get('firebug')->info($this->annonces);
$this->logger->info($this->annonces);
$this->view = new Zend_View();
}

View File

@ -18,8 +18,18 @@ class RapportComment
protected $graphCouleurs = array();
protected $pathImage = '';
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function __construct($siret, $id, $tabCommentaires = array(), $RatiosInfos = null, $BilansInfos = null, $RatiosSecteur = null, $tabProjection = array())
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
//Assignation
$this->commentaires = $tabCommentaires;
$c = Zend_Registry::get('config');
@ -307,12 +317,12 @@ class RapportComment
$pattern = '/COULEUR\((.*)\)/i';
///Detection couleur
if ( preg_match($pattern, $content, $matches) ) {
Zend_Registry::get('firebug')->info('DETECTION Couleurs');
$this->logger->info('DETECTION Couleurs');
$listeCouleurs = $matches[1];
//Récupération des couleurs
$pattern = '/([a-z0-9]{3,4})/i';
if ( preg_match_all($pattern, $listeCouleurs, $matches) ) {
Zend_Registry::get('firebug')->info($matches);
$this->logger->info($matches);
$nbCouleurs = count($matches[1]);
for($i=0;$i<$nbCouleurs;$i++){
$this->graphCouleurs[] = $assocNomCouleurs[$matches[1][$i]];
@ -327,7 +337,7 @@ class RapportComment
{
$pattern = '/\[GRAPHIQUE id=(.*?) titre=\'(.*?)\',(.*)\]/';
if( preg_match($pattern, $content, $matches) ){
Zend_Registry::get('firebug')->info($content);
$this->logger->info($content);
$image_id = $matches[1];
$titre = $matches[2];
//Génération id/nom fichier graphique
@ -352,7 +362,7 @@ class RapportComment
}
}
Zend_Registry::get('firebug')->info('Graphique : '.$type);
$this->logger->info('Graphique : '.$type);
switch($detectType){
case 'histo':
@ -494,10 +504,10 @@ class RapportComment
if( $this->cache_graph($this->pathImage.$file) ){
$output = $file;
} else {
Zend_Registry::get('firebug')->info('Histo - id : '.$id);
Zend_Registry::get('firebug')->info('Histo - titre : '.$titre);
Zend_Registry::get('firebug')->info('Histo - strRatios : '.$strRatios);
Zend_Registry::get('firebug')->info($this->ratiosEntrep);
$this->logger->info('Histo - id : '.$id);
$this->logger->info('Histo - titre : '.$titre);
$this->logger->info('Histo - strRatios : '.$strRatios);
$this->logger->info($this->ratiosEntrep);
// --- Gestion des couleurs
if(count($this->graphCouleurs)>0){
$couleurs = $this->graphCouleurs;
@ -574,7 +584,7 @@ class RapportComment
}
}
if ( !isset($unite) ) { $unite = 'EUR'; }
Zend_Registry::get('firebug')->info($data);
$this->logger->info($data);
// --- Graphique
if ( count($data)<=1 ){
$output = false;

View File

@ -3,6 +3,12 @@ class Scores_Session_Entreprise
{
protected $index = 'entrep';
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
/**
* @param string $siret
* @param int $id
@ -10,6 +16,10 @@ class Scores_Session_Entreprise
*/
public function __construct($siret, $id = 0, $set = false)
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
if ( !empty($siret) && !$set ) {
if (!$this->checkSession($siret, $id) ){
$this->getInfoEntrep($siret, $id);
@ -113,7 +123,7 @@ class Scores_Session_Entreprise
protected function getInfoEntrep($siret, $id = 0)
{
Zend_Registry::get('firebug')->info('getInfoEntrep');
$this->logger->info('getInfoEntrep');
require_once 'Scores/WsScores.php';
$ws = new WsScores();
$etab = $ws->getIdentiteLight($siret, $id);

View File

@ -7,9 +7,19 @@ class Scores_Utilisateur
*/
public $identity = null;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
public function __construct()
{
$auth = Zend_Auth::getInstance();
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
$auth = Zend_Auth::getInstance();
if ( $auth->hasIdentity() ) {
$this->identity = $auth->getIdentity();
}
@ -333,7 +343,7 @@ class Scores_Utilisateur
);
$clientstatM = new Application_Model_ClientStat();
$id = $clientstatM->insert($data);
Zend_Registry::get('firebug')->info('Insertion : '.$id);
$this->logger->info('Insertion : '.$id);
}
}

View File

@ -59,6 +59,12 @@ class Scores_Ws_Client extends Zend_Soap_Client
*/
protected $cache;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
/**
* Créer l'environnement nécessaire pour le chargement du webservice
* @param string $name
@ -70,6 +76,10 @@ class Scores_Ws_Client extends Zend_Soap_Client
*/
public function __construct($name, $version, $user = null)
{
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
// --- Configuration de l'application
if (Zend_Registry::isRegistered('config')) {
$c = Zend_Registry::get('config');
@ -103,7 +113,7 @@ class Scores_Ws_Client extends Zend_Soap_Client
if (PHP_SAPI != 'cli' && $user === null) {
$user = new Scores_Utilisateur();
Zend_Registry::get('firebug')->info($user->getPassword());
$this->logger->info($user->getPassword());
}
if ($user !== null) {
@ -137,7 +147,7 @@ class Scores_Ws_Client extends Zend_Soap_Client
}
$methodConfig = $this->config[$name];
Zend_Registry::get('firebug')->info($methodConfig);
$this->logger->info($methodConfig);
// --- Cache
$cacheEnable = false;
if ( array_key_exists('cache', $methodConfig) ) {
@ -162,8 +172,8 @@ class Scores_Ws_Client extends Zend_Soap_Client
// --- Debug
if ( array_key_exists('debug', $methodConfig) ) {
Zend_Registry::get('firebug')->info(__CLASS__.'->'.$name);
Zend_Registry::get('firebug')->info($arguments);
$this->logger->info(__CLASS__.'->'.$name);
$this->logger->info($arguments);
}
try {
@ -172,7 +182,7 @@ class Scores_Ws_Client extends Zend_Soap_Client
// --- Debug
if ( array_key_exists('debug', $methodConfig) ) {
Zend_Registry::get('firebug')->info($response);
$this->logger->info($response);
}
// --- Cache
@ -186,13 +196,13 @@ class Scores_Ws_Client extends Zend_Soap_Client
// --- Debug
if ( array_key_exists('debug', $methodConfig) ) {
Zend_Registry::get('firebug')->info($fault->faultcode.' - '.$fault->faultstring);
$this->logger->info($fault->faultcode.' - '.$fault->faultstring);
}
// --- Gestion des SOAP fault
if ( array_key_exists('errorMsg', $methodConfig) ) {
if ( in_array($fault->faultcode, $methodConfig['errorMsg']) ) {
Zend_Registry::get('firebug')->info("Exception as error message : ".$fault->faultcode);
$this->logger->info("Exception as error message : ".$fault->faultcode);
throw new Exception($fault->faultstring);
}
}

View File

@ -39,6 +39,12 @@ class WsScores
*/
protected $cacheWrite = true;
/**
* Logger
* @var \Monolog\Logger
*/
protected $logger;
/**
* Load WebService config
* @param string $login
@ -46,7 +52,11 @@ class WsScores
*/
public function __construct($login = '', $password = '')
{
$c = new Zend_Config_Ini(realpath(dirname(__FILE__)) . '/webservices.ini');
if (Zend_Registry::isRegistered('logger')) {
$this->logger = Zend_Registry::get('logger');
}
$c = new Zend_Config_Ini(realpath(dirname(__FILE__)) . '/webservices.ini');
$config = $c->toArray();
$this->webservices = $config['webservices'];
if ( !empty($login) && !empty($password) ){
@ -93,7 +103,7 @@ class WsScores
try {
$client = new SoapClient($wsdl, $options);
} catch (Exception $e) {
Zend_Registry::get('firebug')->info($e->getMessage());
$this->logger->info($e->getMessage());
throw new Exception('Application Error');
}
return $client;
@ -112,7 +122,7 @@ class WsScores
$reponse = $client->setBilanEnterCmd($params);
return $reponse->setBilanEnterCmdResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
@ -127,7 +137,7 @@ class WsScores
$reponse = $client->getLiasseInfos($params);
return $reponse->getLiasseInfosResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -151,7 +161,7 @@ class WsScores
$reponse = $client->setContactEt($params);
return $reponse->setContactEtResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
return $fault->faultstring;
}
}
@ -165,7 +175,7 @@ class WsScores
$reponse = $client->getContactEt($params);
return $reponse->getContactEtResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
return $fault->faultstring;
}
}
@ -198,7 +208,7 @@ class WsScores
}
return $reponse->getContactEtResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -305,7 +315,7 @@ class WsScores
$reponse = $client->setSurveillancesMail($params);
return $reponse->setSurveillancesMailResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -325,7 +335,7 @@ class WsScores
$reponse = $client->setUserService($params);
return $reponse->setUserServiceResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -446,7 +456,7 @@ class WsScores
$reponse = $client->setLienChange($params);
return $reponse->setLienChangeResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -486,7 +496,7 @@ class WsScores
$reponse = $client->setScoreCutoff($params);
return $reponse->setScoreCutoffResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
return $fault->faultstring;
}
}
@ -505,7 +515,7 @@ class WsScores
$reponse = $client->getScoreCutoff($params);
return $reponse->getScoreCutoffResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
return $fault->faultstring;
}
}
@ -524,7 +534,7 @@ class WsScores
$reponse = $client->delScoreCutoff($params); //change name when webservice is ready
return $reponse->delScoreCutoffResult; //change name when webservice is ready
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
return $fault->faultstring;
}
}
@ -539,7 +549,7 @@ class WsScores
$reponse = $client->searchLogin($params);
return $reponse->searchLoginResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
@ -562,7 +572,7 @@ class WsScores
$cache->setBlock($reponse->getCurrencyResult);
return $reponse->getCurrencyResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
@ -591,7 +601,7 @@ class WsScores
$cache->setBlock($reponse->getCountryResult);
return $reponse->getCountryResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
@ -607,7 +617,7 @@ class WsScores
$reponse = $client->setBourse($params);
return $reponse->setBourseResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -626,7 +636,7 @@ class WsScores
$reponse = $client->getBourse($params);
return $reponse->getBourseResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -647,7 +657,7 @@ class WsScores
$reponse = $client->setService($params);
return $reponse->setServiceResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -665,10 +675,10 @@ class WsScores
$client = $this->loadClient('gestion');
try {
$reponse = $client->getServiceUsers($params);
Zend_Registry::get('firebug')->info($reponse);
$this->logger->info($reponse);
return $reponse->getServiceUsersResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -687,7 +697,7 @@ class WsScores
$reponse = $client->getServices($params);
return $reponse->getServicesResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -706,7 +716,7 @@ class WsScores
$reponse = $client->getCountryId($params);
return $reponse->getCountryIdResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -725,7 +735,7 @@ class WsScores
$reponse = $client->getLien($params);
return $reponse->getLienResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -746,7 +756,7 @@ class WsScores
$reponse = $client->getLienDoc($params);
return $reponse->getLienDocResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
@ -762,7 +772,7 @@ class WsScores
$reponse = $client->setLienDoc($params);
return $reponse->setLienDocResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
@ -778,7 +788,7 @@ class WsScores
$reponse = $client->setLien($params);
return $reponse->setLienResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -797,7 +807,7 @@ class WsScores
$reponse = $client->getLienRef($params);
return $reponse->getLienRefResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -816,7 +826,7 @@ class WsScores
$reponse = $client->getLienRef($params);
return $reponse->getLienRefResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -836,7 +846,7 @@ class WsScores
$reponse = $client->setLienRef($params);
return $reponse->setLienRefResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -856,7 +866,7 @@ class WsScores
$reponse = $client->searchLienRef($params);
return $reponse->searchLienRefResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -879,7 +889,7 @@ class WsScores
$reponse = $client->setActeAsso($params);
return $reponse->setActeAssoResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -908,7 +918,7 @@ class WsScores
$reponse = $client->setBilan($params);
return $reponse->setBilanResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -938,7 +948,7 @@ class WsScores
$reponse = $client->getBilans($params);
return $reponse->getBilansResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
@ -963,10 +973,10 @@ class WsScores
$client = $this->loadClient('pieces');
try {
$reponse = $client->getBilan($params);
Zend_Registry::get('firebug')->info($reponse);
$this->logger->info($reponse);
return $reponse->getBilanResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
@ -986,10 +996,10 @@ class WsScores
$client = $this->loadClient('pieces');
try {
$reponse = $client->getActe($params);
Zend_Registry::get('firebug')->info($reponse);
$this->logger->info($reponse);
return $reponse->getActeResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
@ -1006,7 +1016,7 @@ class WsScores
$reponse = $client->getActes($params);
return $reponse->getActesResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
@ -1025,7 +1035,7 @@ class WsScores
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
@ -1045,7 +1055,7 @@ class WsScores
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
@ -1065,7 +1075,7 @@ class WsScores
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
@ -1079,7 +1089,7 @@ class WsScores
$client = $this->loadClient('gestion');
try {
$reponse = $client->setCGU($params);
Zend_Registry::get('firebug')->info($reponse);
$this->logger->info($reponse);
return $reponse->setCGUResult;
} catch(SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
@ -1119,7 +1129,7 @@ class WsScores
$client = $this->loadClient('gestion');
try {
$reponse = $client->getEmail($params);
Zend_Registry::get('firebug')->info($reponse);
$this->logger->info($reponse);
return $reponse->getEmailResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
@ -1229,7 +1239,7 @@ class WsScores
return $reponse->getKbisResult;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('0000', 'MSG')) ){
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
@ -1678,7 +1688,7 @@ class WsScores
$reponse = $client->setMandataire($params);
return $reponse->setMandataireResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -2329,7 +2339,7 @@ class WsScores
$client = $this->loadClient('entreprise');
try {
$reponse = $client->getAnnoncesLegales($params);
Zend_Registry::get('firebug')->info($reponse);
$this->logger->info($reponse);
if ($this->cacheWrite) {
$cache->deletefile();
$cache->setBlock($reponse->getAnnoncesLegalesResult);
@ -2689,7 +2699,7 @@ class WsScores
$reponse = $client->setDirigeantsOp($params);
return $reponse->setDirigeantsOpResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -2726,7 +2736,7 @@ class WsScores
}
return $reponse->getAvisRncsResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->logger->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
@ -3118,7 +3128,7 @@ class WsScores
return $reponse->setCmdAssoResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
Zend_Registry::get('firebug')->info($fault);
$this->logger->info($fault);
//Placer exception pour affichage message
return false;
}
@ -3171,7 +3181,7 @@ class WsScores
return $fault->getMessage();
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
Zend_Registry::get('firebug')->info($fault);
$this->logger->info($fault);
//Placer exception pour affichage message
return false;
@ -3235,11 +3245,11 @@ class WsScores
try {
$client = $this->loadClient('gestion');
$reponse = $client->getNextLogin($params);
Zend_Registry::get('firebug')->info($reponse);
$this->logger->info($reponse);
return $reponse->getNextLoginResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
Zend_Registry::get('firebug')->info($fault);
$this->logger->info($fault);
//Placer exception pour affichage message
return false;
}
@ -3372,7 +3382,7 @@ class WsScores
$message.= "Reponse :\n ".$reponse."\n";
if (APPLICATION_ENV == 'development' ) {
Zend_Registry::get('firebug')->info('Erreur SOAP - Code : '.$fault->faultcode.' - Message : '.$fault->faultstring);
$this->logger->info('Erreur SOAP - Code : '.$fault->faultcode.' - Message : '.$fault->faultstring);
} else {
$c = Zend_Registry::get('config');
$mail = new Scores_Mail_Method();