2009-05-08 05:52:10 +02:00
< ? php
/* Copyright ( C ) 2009 Laurent Destailleur < eldy @ users . sourceforge . net >
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
2013-01-16 15:36:08 +01:00
* the Free Software Foundation ; either version 3 of the License , or
2009-05-08 05:52:10 +02:00
* ( at your option ) any later version .
*
* This program 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 General Public License for more details .
*
* You should have received a copy of the GNU General Public License
2019-09-23 21:55:30 +02:00
* along with this program . If not , see < https :// www . gnu . org / licenses />.
2009-05-08 05:52:10 +02:00
*/
/**
2009-07-30 00:52:08 +02:00
* \defgroup webservices Module webservices
2009-05-08 14:08:54 +02:00
* \brief Module to enable the Dolibarr server of web services
2011-10-24 14:11:49 +02:00
* \file htdocs / core / modules / modWebServices . class . php
2009-05-08 14:08:54 +02:00
* \ingroup webservices
2021-03-20 13:55:43 +01:00
* \brief Description and activation file for the module webservices
2009-05-08 14:08:54 +02:00
*/
2020-04-10 10:59:32 +02:00
include_once DOL_DOCUMENT_ROOT . '/core/modules/DolibarrModules.class.php' ;
2009-05-08 05:52:10 +02:00
/**
2012-10-03 00:30:50 +02:00
* Class to describe a WebServices module
2009-05-08 05:52:10 +02:00
*/
class modWebServices extends DolibarrModules
{
2020-10-31 14:32:18 +01:00
/**
2011-09-26 16:22:35 +02:00
* Constructor . Define names , constants , directories , boxes , permissions
*
2012-01-04 21:23:50 +01:00
* @ param DoliDB $db Database handler
2020-10-31 14:32:18 +01:00
*/
public function __construct ( $db )
{
$this -> db = $db ;
$this -> numero = 2600 ;
2009-05-08 05:52:10 +02:00
2020-10-31 14:32:18 +01:00
$this -> family = " interface " ;
$this -> module_position = '25' ;
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this -> name = preg_replace ( '/^mod/i' , '' , get_class ( $this ));
$this -> description = " Enable the Dolibarr web services server " ;
2023-03-28 23:58:32 +02:00
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated', 'experimental_deprecated' or a version string like 'x.y.z'
$this -> version = 'dolibarr_deprecated' ;
2020-10-31 14:32:18 +01:00
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this -> const_name = 'MAIN_MODULE_' . strtoupper ( $this -> name );
// Name of image file used for this module.
$this -> picto = 'technic' ;
2009-05-08 05:52:10 +02:00
2020-10-31 14:32:18 +01:00
// Data directories to create when module is enabled
$this -> dirs = array ();
2009-05-08 05:52:10 +02:00
2020-10-31 14:32:18 +01:00
// Config pages
$this -> config_page_url = array ( " index.php@webservices " );
2009-05-08 05:52:10 +02:00
2020-10-31 14:32:18 +01:00
// Dependencies
$this -> hidden = false ; // A condition to hide module
2020-04-10 10:59:32 +02:00
$this -> depends = array (); // List of module class names as string that must be enabled if this module is enabled
$this -> requiredby = array (); // List of module ids to disable if this one is disabled
$this -> conflictwith = array (); // List of module class names as string this module is in conflict with
2022-09-27 20:48:47 +02:00
$this -> phpmin = array ( 7 , 0 ); // Minimum version of PHP required by module
2020-10-31 14:32:18 +01:00
$this -> langfiles = array ( " other " );
2009-05-08 05:52:10 +02:00
2020-10-31 14:32:18 +01:00
// Constants
$this -> const = array ();
2009-05-08 05:52:10 +02:00
2020-10-31 14:32:18 +01:00
// New pages on tabs
$this -> tabs = array ();
2009-05-08 05:52:10 +02:00
2020-10-31 14:32:18 +01:00
// Boxes
$this -> boxes = array ();
2009-05-08 05:52:10 +02:00
2020-10-31 14:32:18 +01:00
// Permissions
$this -> rights = array ();
$this -> rights_class = 'webservices' ;
$r = 0 ;
}
2009-05-08 05:52:10 +02:00
}