dolibarr  7.0.0-beta
Public Member Functions | Public Attributes | List of all members
PriceGlobalVariable Class Reference

Class for accesing price global variables table. More...

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 create ($user, $notrigger=0)
 Create object into database. More...
 
 fetch ($id)
 Load object in memory from the database. More...
 
 update ($user=0, $notrigger=0)
 Update object into database. More...
 
 delete ($rowid, $user, $notrigger=0)
 Delete object in database. More...
 
 initAsSpecimen ()
 Initialise object with example values Id must be 0 if object instance is a specimen. More...
 
 checkParameters ()
 Checks if all parameters are in order. More...
 
 listGlobalVariables ()
 List all price global variables. More...
 

Public Attributes

 $db
 To store db handler.
 
 $error
 To return error code (or message)
 
 $errors =array()
 To return several error codes (or messages)
 

Detailed Description

Class for accesing price global variables table.

Definition at line 30 of file price_global_variable.class.php.

Constructor & Destructor Documentation

PriceGlobalVariable::__construct (   $db)

Constructor.

Parameters
DoliDb$dbDatabase handler

Definition at line 46 of file price_global_variable.class.php.

References $db.

Member Function Documentation

PriceGlobalVariable::checkParameters ( )

Checks if all parameters are in order.

Returns
void

Definition at line 288 of file price_global_variable.class.php.

References description.

Referenced by create(), fetch(), and update().

PriceGlobalVariable::create (   $user,
  $notrigger = 0 
)

Create object into database.

Parameters
User$userUser that creates
int$notrigger0=launch triggers after, 1=disable triggers
Returns
int <0 if KO, Id of created object if OK

Definition at line 60 of file price_global_variable.class.php.

References $error, $resql, checkParameters(), description, and dol_syslog().

PriceGlobalVariable::delete (   $rowid,
  $user,
  $notrigger = 0 
)

Delete object in database.

Parameters
int$rowidRow id of global variable
User$userUser that deletes
int$notrigger0=launch triggers after, 1=disable triggers
Returns
int <0 if KO, >0 if OK

Definition at line 221 of file price_global_variable.class.php.

References $error, $resql, and dol_syslog().

PriceGlobalVariable::fetch (   $id)

Load object in memory from the database.

Parameters
int$idId object
Returns
int < 0 if KO, 0 if OK but not found, > 0 if OK

Definition at line 122 of file price_global_variable.class.php.

References $resql, checkParameters(), description, and dol_syslog().

PriceGlobalVariable::initAsSpecimen ( )

Initialise object with example values Id must be 0 if object instance is a specimen.

Returns
void

Definition at line 275 of file price_global_variable.class.php.

References description.

PriceGlobalVariable::listGlobalVariables ( )

List all price global variables.

Returns
array Array of price global variables

Definition at line 303 of file price_global_variable.class.php.

References $resql, and dol_syslog().

PriceGlobalVariable::update (   $user = 0,
  $notrigger = 0 
)

Update object into database.

Parameters
User$userUser that modifies
int$notrigger0=launch triggers after, 1=disable triggers
Returns
int <0 if KO, >0 if OK

Definition at line 161 of file price_global_variable.class.php.

References $error, $resql, checkParameters(), description, and dol_syslog().


The documentation for this class was generated from the following file: