dolibarr  13.0.2
Public Member Functions | List of all members
Cstate Class Reference

Class to manage dictionary States (used by imports) More...

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 create ($user, $notrigger=0)
 Create object into database. More...
 
 fetch ($id, $code= '')
 Load object in memory from database. More...
 
 update ($user=null, $notrigger=0)
 Update object into database. More...
 
 delete ($user, $notrigger=0)
 Delete object in database. More...
 

Detailed Description

Class to manage dictionary States (used by imports)

Definition at line 27 of file cstate.class.php.

Constructor & Destructor Documentation

Cstate::__construct (   $db)

Constructor.

Parameters
DoliDb$dbDatabase handler

Definition at line 76 of file cstate.class.php.

References db.

Member Function Documentation

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

Create object into database.

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

Definition at line 89 of file cstate.class.php.

References $resql, db, dol_syslog(), nom, and rowid.

Cstate::delete (   $user,
  $notrigger = 0 
)

Delete object in database.

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

Definition at line 241 of file cstate.class.php.

References $resql, db, and dol_syslog().

Cstate::fetch (   $id,
  $code = '' 
)

Load object in memory from database.

Parameters
int$idId object
string$codeCode
Returns
int <0 if KO, >0 if OK

Definition at line 149 of file cstate.class.php.

References $resql, code, db, dol_syslog(), name, and nom.

Cstate::update (   $user = null,
  $notrigger = 0 
)

Update object into database.

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

Definition at line 193 of file cstate.class.php.

References $resql, db, dol_syslog(), and nom.


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