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

Class to manage dictionary Countries (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...
 

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 to manage dictionary Countries (used by imports)

Definition at line 33 of file ccountry.class.php.

Constructor & Destructor Documentation

Ccountry::__construct (   $db)

Constructor.

Parameters
DoliDb$dbDatabase handler

Definition at line 55 of file ccountry.class.php.

References $db.

Member Function Documentation

Ccountry::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 69 of file ccountry.class.php.

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

Ccountry::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 268 of file ccountry.class.php.

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

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

Load object in memory from database.

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

Definition at line 148 of file ccountry.class.php.

References $resql, and dol_syslog().

Ccountry::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 197 of file ccountry.class.php.

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


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