Skip to content
Snippets Groups Projects

Master

Closed Patrick Barroca requested to merge master into WIP
Compare and
+ 100
57
Preferences
Compare changes
Files
@@ -16,33 +16,35 @@
*
* 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
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class Class_WebService_SIGB_Pergame {
protected static $services;
protected static $_services, $_default_service;
public static function getService($params){
if (!isset(self::$service))
self::$services = array();
if (static::$_default_service)
return static::$_default_service;
if (!isset(static::$_services))
static::$_services = [];
$id_bib = $params['id_bib'];
if (!array_key_exists($id_bib, self::$services))
self::$services[$id_bib] = Class_WebService_SIGB_Pergame_Service::getService($id_bib);
if (!array_key_exists($id_bib, static::$_services))
static::$_services[$id_bib] = Class_WebService_SIGB_Pergame_Service::getService($id_bib);
return self::$services[$id_bib];
return static::$_services[$id_bib];
}
public static function setService($service) {
self::$service = $service;
static::$_default_service = $service;
}
public static function reset() {
self::$service = null;
static::$_default_service = static::$_services = null;
}
}
?>
\ No newline at end of file