Commit e787078c authored by Patrick Barroca's avatar Patrick Barroca 🐧

Merge branch 'dev#93357_contractuel_insep_creation_du_connecteur_flora' into 'master'

dev #93357 Adds Flora ILS Webservices

See merge request !3427
parents 03a6385a 9e41ee71
Pipeline #9660 passed with stage
in 42 minutes and 37 seconds
'93357' =>
['Label' => $this->_('SIGB Decalog Flora'),
'Desc' => $this->_('Support des web services du SIGB Decalog Flora (disponibilité temps réel, réservations, compte lecteur)'),
'Image' => '',
'Video' => '',
'Category' => $this->_('Communication SIGB'),
'Right' => function($feature_description, $user) {return true;},
'Wiki' => 'http://wiki.bokeh-library-portal.org/index.php?title=SIGB_Flora',
'Test' => '',
'Date' => '2020-01-23'],
\ No newline at end of file
- ticket #93357 : Ajout du connecteur SIGB Decalog Flora
\ No newline at end of file
......@@ -2,23 +2,8 @@
error_reporting(E_ERROR | E_PARSE);
define("APPLI","cosmogramme");
define("COSMOPATH", "/var/www/html/vhosts/opac2/www/htdocs");
define("CRLF", chr(13) . chr(10));
define("BR","<br />");
define('COM_PERGAME', 1);
define('COM_OPSYS', 2);
define('COM_Z3950', 3);
define('COM_VSMART', 4);
define('COM_KOHA', 5);
define('COM_CARTHAME', 6);
define('COM_NANOOK', 7);
define('COM_ORPHEE', 8);
define('COM_MICROBIB', 9);
define('COM_BIBLIXNET', 10);
define('COM_DYNIX', 11);
define('COM_CDSCRIPT', 12);
define('COM_PMB', 13);
define('COM_WATERBEAR', 14);
$basePath = dirname(realpath(__FILE__));
set_include_path(get_include_path()
......
......@@ -152,14 +152,16 @@ else
print('<tr>');
print('<th class="form" align="left" colspan="2"><a name="b'.$id_bib.'p0"><b>Paramètres bibliothèque</b></a></th></tr>');
printLigne("Nom abrégé",getChamp("nom_court",$bib["nom"],45),"form_first");
printLigne("Sigb",getComboCodif("sigb","sigb",$bib["sigb"]));
printLigne("Sigb",getComboSimple("sigb", $bib["sigb"], Class_IntBib::getSigbLabels()));
printLigne("Code qualité des notices",getComboCodif("qualite","code_qualite",$bib["qualite"]));
printLigne("Ecart maxi entre 2 intégrations",getChamp("ecart_ajouts",$bib["ecart_ajouts"],3));
printLigne("Exclure des exports du catalogue",getComboSimple("pas_exporter",$bib["pas_exporter"],array("0"=>"non","1"=>"oui")));
printLigne("Adresse E-mail",getChamp("mail",$bib["mail"],45));
$blocs_params=getBlocsParams($id_bib,$bib["comm_sigb"],$bib["comm_params"]);
$event="activerBlocCommBib('".$id_bib."',this.value)";
printLigne("Mode de communication avec le sigb",getComboCodif("comm_sigb","comm_sigb",$bib["comm_sigb"],'onchange="'.$event.'"').$blocs_params);
printLigne("Mode de communication avec le sigb",getComboSimple("comm_sigb",$bib["comm_sigb"], Class_IntBib::getCommLabels(),false, 'onchange="'.$event.'"').$blocs_params);
print('<tr><th colspan="2" class="form" align="center">'. $bouton_modif .'</th></tr>');
print('</table></form></div>');
......
......@@ -80,10 +80,10 @@ function getTextarea($id, $valeur, $largeur, $hauteur) {
*/
function getBlocsParams($id_bib, $type, $valeurs) {
$valeurs = unserialize($valeurs);
$types = getCodifsVariable("comm_sigb");
$types = array_keys(Class_IntBib::getCommLabels());
foreach($types as $clef) {
foreach($types as $item) {
$clef = $item['code'];
$bloc .= sprintf('<div id="comm_%s_%s" style="display:%s">',
$id_bib, $clef, ($clef == $type) ? 'block' : 'none');
......@@ -91,7 +91,7 @@ function getBlocsParams($id_bib, $type, $valeurs) {
$champs_params = [];
$titres[0] = 'Paramètres';
if(in_array($clef, [COM_NANOOK]))
if(in_array($clef, [Class_IntBib::COM_NANOOK]))
$champs_params[0] = ['url_serveur',
['provide_suggest' => function($id, $valeur) {
return getOuiNon($id, $valeur);
......@@ -100,23 +100,23 @@ function getBlocsParams($id_bib, $type, $valeurs) {
return getOuiNon($id, $valeur);
}]];
if(in_array($clef, [COM_CDSCRIPT]))
if(in_array($clef, [Class_IntBib::COM_CDSCRIPT]))
$champs_params[0] = ['server_url',
'remote_library_id'];
if (in_array($clef, [COM_PMB, COM_VSMART, COM_MICROBIB, COM_BIBLIXNET, COM_WATERBEAR]))
if (in_array($clef, [Class_IntBib::COM_PMB, Class_IntBib::COM_VSMART, Class_IntBib::COM_MICROBIB, Class_IntBib::COM_BIBLIXNET, Class_IntBib::COM_WATERBEAR]))
$champs_params[0] = ['url_serveur'];
if (COM_PMB == $clef)
if (Class_IntBib::COM_PMB == $clef)
$champs_params[0][] = ['exp_bulletin_is_exp_notice' => function($id, $valeur) {
return getOuiNon($id, $valeur);
}];
if (in_array($clef, [COM_CARTHAME]))
if (in_array($clef, [Class_IntBib::COM_CARTHAME]))
$champs_params[0] = ['url_serveur', 'key','sigb_field_name'];
if (in_array($clef, [COM_ORPHEE]))
if (in_array($clef, [Class_IntBib::COM_ORPHEE]))
$champs_params[0] = ['url_serveur',
'key',
'allow_hold_available_items',
......@@ -127,7 +127,7 @@ function getBlocsParams($id_bib, $type, $valeurs) {
'1' => 'A l\'exemplaire']);
}]];
if ($clef == COM_KOHA)
if ($clef == Class_IntBib::COM_KOHA)
$champs_params[0] = ['url_serveur',
['restful' => function($id, $valeur) {
return getOuiNon($id, $valeur);
......@@ -150,16 +150,19 @@ function getBlocsParams($id_bib, $type, $valeurs) {
return getTextArea($id, $valeur, 30, 5);
}]];
if ($clef == COM_OPSYS)
if ($clef == Class_IntBib::COM_OPSYS)
$champs_params[0] = ['url_serveur', 'catalogue_web', 'reserver_retrait_bib_abonne'];
if ($clef == COM_DYNIX)
if ($clef == Class_IntBib::COM_DYNIX)
$champs_params[0] = ['url_serveur', 'client_id'];
if ($clef == COM_Z3950)
if ($clef == Class_IntBib::COM_Z3950)
$champs_params[0] = ['url_serveur', 'login', 'password', 'nom_base'];
if ($clef == COM_PERGAME) {
if ($clef == Class_IntBib::COM_FLORA)
$champs_params[0] = ['url_serveur', 'login', 'password'];
if ($clef == Class_IntBib::COM_PERGAME) {
$titres = ['Règles de réservations', 'Règles de prolongations'];
$champs_params[0] = ['Autoriser_docs_disponibles', 'Max_par_carte' , 'Max_par_document'];
$champs_params[1] = ['Autoriser_prolongations', 'Interdire_si_reservation',
......@@ -193,13 +196,13 @@ function getBlocsParams($id_bib, $type, $valeurs) {
}
$bloc .= '</table>';
if ($clef == COM_NANOOK) {
if ($clef == Class_IntBib::COM_NANOOK) {
$bloc .= "Format(0.8.7): ip:port/chemin_tomcat/ilsdi/nom_base <br/>"
. "Ex: 62.193.55.152:8080/afi_NanookWs/ilsdi/NANOOK";
}
}
if (in_array($clef, [COM_NANOOK, COM_KOHA, COM_PMB]))
if (in_array($clef, [Class_IntBib::COM_NANOOK, Class_IntBib::COM_KOHA, Class_IntBib::COM_PMB]))
$bloc .= " <br/><a target='_blank' class='test' href='#'>Tester la communication</a>";
$bloc .= '</div>';
}
......
......@@ -25,7 +25,6 @@ class Class_AdminVarLoader extends Storm_Model_Loader {
protected static $_all_vars_values, $_all_vars;
protected $_inited = false;
public function init() {
......
......@@ -20,6 +20,54 @@
*/
class IntBibLoader extends Storm_Model_Loader {
use Trait_Translator;
public function getSigbLabels() {
return [Class_IntBib::SIGB_NONE => $this->_('Pas informatisé'),
Class_IntBib::SIGB_PERGAME => 'Pergame',
Class_IntBib::SIGB_PAPRIKA => 'Paprika',
Class_IntBib::SIGB_ORPHEE => 'Orphee',
Class_IntBib::SIGB_OPSYS => 'Opsys/Aloès',
Class_IntBib::SIGB_MICROBIB => 'Microbib',
Class_IntBib::SIGB_ATALANTE => 'Atalante',
Class_IntBib::SIGB_MULTILIS => 'Multilis',
Class_IntBib::SIGB_BIBAL => 'Bibal',
Class_IntBib::SIGB_MILORD => 'Milord',
Class_IntBib::SIGB_ELISSA => 'Elissa',
Class_IntBib::SIGB_VSMART => 'VSmart',
Class_IntBib::SIGB_KOHA => 'Koha',
Class_IntBib::SIGB_NANOOK => 'Nanook',
Class_IntBib::SIGB_CARTHAME => 'Carthame/Karvi',
Class_IntBib::SIGB_DYNIX => 'Dynix',
Class_IntBib::SIGB_BIBLIXNET => 'BiblixNet',
Class_IntBib::SIGB_CDSCRIPT => 'CdScript',
Class_IntBib::SIGB_PMB => 'PMB',
Class_IntBib::SIGB_WATERBEAR => 'Waterbear',
Class_IntBib::SIGB_FLORA => 'Flora',
];
}
public function getCommLabels() {
return [Class_IntBib::COM_NONE => $this->_('Aucun'),
Class_IntBib::COM_PERGAME => 'Pergame',
Class_IntBib::COM_OPSYS => 'Opsys',
Class_IntBib::COM_Z3950 => $this->_('serveur Z39.50'),
Class_IntBib::COM_VSMART => 'VSmart',
Class_IntBib::COM_KOHA => 'Koha',
Class_IntBib::COM_CARTHAME => 'Carthame',
Class_IntBib::COM_NANOOK => 'AFI-Nanook',
Class_IntBib::COM_ORPHEE => 'Orphée',
Class_IntBib::COM_MICROBIB => 'Microbib',
Class_IntBib::COM_BIBLIXNET => 'BiblixNet',
Class_IntBib::COM_DYNIX => 'Dynix-Symphony',
Class_IntBib::COM_CDSCRIPT => 'Cd-Script',
Class_IntBib::COM_PMB => 'PMB',
Class_IntBib::COM_WATERBEAR => 'Waterbear',
Class_IntBib::COM_FLORA => 'Flora',
];
}
public function findAllForCombo() {
$combo = [];
foreach(Class_IntBib::findAll() as $library)
......@@ -98,6 +146,7 @@ class Class_IntBib extends Storm_Model_Abstract {
const COM_NONE = 0;
const COM_PERGAME = 1;
const COM_OPSYS = 2;
const COM_Z3950 = 3;
const COM_VSMART = 4;
const COM_KOHA = 5;
const COM_CARTHAME = 6;
......@@ -109,12 +158,29 @@ class Class_IntBib extends Storm_Model_Abstract {
const COM_CDSCRIPT = 12;
const COM_PMB = 13;
const COM_WATERBEAR = 14;
const COM_FLORA = 15;
const SIGB_NONE = 0;
const SIGB_PERGAME = 1;
const SIGB_PAPRIKA = 2;
const SIGB_ORPHEE = 3;
const SIGB_OPSYS = 4;
const SIGB_MICROBIB = 5;
const SIGB_ATALANTE = 6;
const SIGB_MULTILIS = 7;
const SIGB_BIBAL = 8;
const SIGB_MILORD = 9;
const SIGB_ELISSA = 10;
const SIGB_VSMART = 11;
const SIGB_KOHA = 12;
const SIGB_NANOOK = 13;
const SIGB_ORPHEE = 3;
const SIGB_CARTHAME = 14;
const SIGB_DYNIX = 15;
const SIGB_CDSCRIPT = 16;
const SIGB_PMB = 17;
const SIGB_WATERBEAR = 18;
const SIGB_BIBLIXNET = 19;
const SIGB_FLORA = 20;
const TYPE = 'type';
const URL_SERVER = 'url_server';
......@@ -131,7 +197,8 @@ class Class_IntBib extends Storm_Model_Abstract {
self::COM_DYNIX => 'Class_WebService_SIGB_Dynix',
self::COM_CDSCRIPT => 'Class_WebService_SIGB_CdScript',
self::COM_PMB => 'Class_WebService_SIGB_PMB',
self::COM_WATERBEAR => 'Class_WebService_SIGB_Waterbear'];
self::COM_WATERBEAR => 'Class_WebService_SIGB_Waterbear',
self::COM_FLORA => 'Class_WebService_SIGB_Flora'];
protected $_table_name = 'int_bib';
protected $_table_primary = 'id_bib';
......@@ -163,7 +230,6 @@ class Class_IntBib extends Storm_Model_Abstract {
return array_keys(self::$COM_CLASSES);
}
public static function detectService($id_type) {
if (isset(self::$COM_CLASSES[$id_type]))
return self::$COM_CLASSES[$id_type];
......
......@@ -147,11 +147,13 @@ class Class_WebService_SIGB_Emprunt extends Class_WebService_SIGB_ExemplaireOper
}
/** seulement Aloes CASQY ? à supprimer ? */
public function getType() {
return $this->type;
}
/** seulement Aloes CASQY ? à supprimer ? */
public function setType($type) {
$this->type = $type;
return $this;
......
<?php
/**
* Copyright (c) 2012-2020, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class Class_WebService_SIGB_Flora {
protected static $_service;
public static function getService($params) {
if (!isset(static::$_service)) {
$instance = new static();
$url_serveur = str_replace('//XAPI', '/XAPI', $params['url_serveur'] . '/XAPI');
static::$_service =
Class_WebService_SIGB_Flora_Service::getService($url_serveur)
->setAPICredentials($params['login'], $params['password']);
}
return static::$_service;
}
public static function setService($service) {
static::$_service = $service;
}
public static function reset() {
static::$_service = null;
}
}
<?php
/**
* Copyright (c) 2012-2020, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
abstract class Class_WebService_SIGB_Flora_AbstractResponseReader {
protected
$_xml_parser;
public function parse($xml) {
$this->_xml_parser = Class_WebService_XMLParser::newInstance()
->setElementHandler($this)
->parse($xml);
}
public function dateToFR($content) {
if (empty($content))
return;
$year = substr($content, 0, 4);
$month = substr($content, 4, 2);
$day = substr($content, 6, 2);
return $day . '/' . $month . '/' . $year;
}
}
<?php
/**
* Copyright (c) 2012-2020, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class Class_WebService_SIGB_Flora_GetBorrowerIdentityResponseReader extends Class_WebService_SIGB_Flora_AbstractResponseReader {
protected
$_emprunteur;
public function emprunteurFromXML($xml) {
$this->_emprunteur = Class_WebService_SIGB_Emprunteur::newInstance();
$this->parse($xml);
return $this->_emprunteur;
}
public function endNOM($content) {
$this->_emprunteur->setName($content);
}
public function endPRENOM($content) {
$this->_emprunteur->setPrenom($content);
}
protected function _dateToISO($date) {
return substr($date,0,4).'-'.substr($date,4, 2).'-'.substr($date,6,2);
}
public function endDATE_NAISSANCE($content) {
$this->_emprunteur->setDateNaissance($this->_dateToISO($content));
}
public function endDATE_RENOUVELLEMENT($content) {
$this->_emprunteur->setEndDate($this->_dateToISO($content));
}
public function endCODE_POSTAL($content) {
$this->_emprunteur->setCodePostal($content);
}
public function endVILLE($content) {
$this->_emprunteur->setVille($content);
}
public function endEMAIL($content) {
$this->_emprunteur->setEmail($content);
}
}
<?php
/**
* Copyright (c) 2012-2020, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class Class_WebService_SIGB_Flora_GetHoldListResponseReader extends Class_WebService_SIGB_Flora_AbstractResponseReader {
protected
$_holds = [],
$_current_hold;
public function reservationsFromXML($xml) {
$this->parse($xml);
return $this->_holds;
}
public function startIcomm_hold() {
$this->_holds []= $this->_current_hold = Class_WebService_SIGB_Reservation::newInstanceWithEmptyExemplaire();
}
public function startCatalog_system_id($attributes) {
$datas = explode(' - ', $attributes['DISPLAY']);
$this->_current_hold
->setTitre($datas[0])
->setAuteur($datas[1]);
}
public function endCatalog_system_id($content) {
$this->_current_hold->setNoNotice($content);
}
}
\ No newline at end of file
<?php
/**
* Copyright (c) 2012-2020, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class Class_WebService_SIGB_Flora_GetLoanListResponseReader extends Class_WebService_SIGB_Flora_AbstractResponseReader {
protected
$_loans = [],
$_current_loan;
public function empruntsFromXML($xml) {
$this->parse($xml);
return $this->_loans;
}
public function startICOMM_LOAN() {
$this->_loans []= $this->_current_loan = Class_WebService_SIGB_Emprunt::newInstanceWithEmptyExemplaire();
$this->_current_loan->setRenewable(false);
}
public function endDue_Date($content) {
$this->_current_loan->setDateRetour($this->dateToFR($content));
}
public function endITEM_BARCODE($content) {
$this->_current_loan->setCodeBarre($content);
}
public function startLOAN_STATUS($attributes) {
$this->_current_loan->setType($attributes['DISPLAY']);
}
public function startITEM_SYSTEM_ID($attributes) {
$datas = explode(' - ', $attributes['DISPLAY']);
$author_parts = explode(' , ',$datas[2]);
$this->_current_loan
->setTitre($datas[1])
->setAuteur(trim(end($author_parts)));
}
public function startItem_Site($attributes) {
$this->_current_loan->setBibliotheque($attributes['DISPLAY']);
}
}
\ No newline at end of file
<?php
/**
* Copyright (c) 2012-2020, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class Class_WebService_SIGB_Flora_ItemsResponseReader extends Class_WebService_SIGB_Flora_AbstractResponseReader {
const
STATUS_LOANED = 2;
protected
$_notice,
$_current_item;
public function recordFromXML($xml) {
$this->_notice = new Class_WebService_SIGB_Notice(0);
$this->parse($xml);
return $this->_notice;
}
public function startICOMM_ITEM() {
$this->_current_item = Class_WebService_SIGB_Exemplaire::newInstance()->beReservable();
$this->_notice->addExemplaire($this->_current_item);
}
public function endUNIQUE_KEY($content) {
$this->_current_item->setId($content);
}
public function endCODE($content) {
$this->_current_item->setCodeBarre($content);
}
public function startStatus($attributes) {
$this->_current_item->setDisponibilite($attributes['DISPLAY']);
}
public function endStatus($content) {
$this->_current_item->setReservable(static::STATUS_LOANED == (int)trim($content));
}
public function endDue_Date($content) {
$this->_current_item->setDateRetour($this->dateToFR($content));
}
}
<?php
/**
* Copyright (c) 2012-2020, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class Class_WebService_SIGB_Flora_Service extends Class_WebService_SIGB_AbstractRESTService {
protected
$_api_login,
$_api_password,
$_token,
$_borrower_id;
public function getEmprunteur($user) {
$xml = $this->_httpGetBorrowerMethod('communication.getBorrowerIdentity',
$user->getIdabon());
return (new Class_WebService_SIGB_Flora_GetBorrowerIdentityResponseReader())
->emprunteurFromXML($xml)
->beValid()
->setService($this);
}
public function __destruct(){
$this->disconnect();
}