dolibarr 19.0.3
BlockedLogAuthority Class Reference

Class to manage certif authority. More...

Public Member Functions

 __construct ($db)
 Constructor.
 
 getLocalBlockChain ()
 Get the blockchain.
 
 getBlockchainHash ()
 Get hash of the block chain to check.
 
 checkBlockchain ($hash)
 Get hash of the block chain to check.
 
 addBlock ($block)
 Add a new block to the chain.
 
 checkBlock ($block)
 hash already exist into chain ?
 
 fetch ($id, $signature='')
 Get object from database.
 
 create ($user)
 Create authority in database.
 
 update ($user)
 Create authority in database.
 
 syncSignatureWithAuthority ()
 For cron to sync to authority.
 

Detailed Description

Class to manage certif authority.

Definition at line 21 of file authority.class.php.

Constructor & Destructor Documentation

◆ __construct()

BlockedLogAuthority::__construct ( $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 69 of file authority.class.php.

Member Function Documentation

◆ addBlock()

BlockedLogAuthority::addBlock ( $block)

Add a new block to the chain.

Parameters
string$blocknew block to chain
Returns
void

Definition at line 125 of file authority.class.php.

◆ checkBlock()

BlockedLogAuthority::checkBlock ( $block)

hash already exist into chain ?

Parameters
string$blocknew block to chain
Returns
boolean

Definition at line 136 of file authority.class.php.

◆ checkBlockchain()

BlockedLogAuthority::checkBlockchain ( $hash)

Get hash of the block chain to check.

Parameters
string$hashhash md5 of blockchain to test
Returns
boolean

Definition at line 114 of file authority.class.php.

References getBlockchainHash().

◆ create()

BlockedLogAuthority::create ( $user)

Create authority in database.

Parameters
User$userObject user that create
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 211 of file authority.class.php.

References dol_syslog().

◆ fetch()

BlockedLogAuthority::fetch ( $id,
$signature = '' )

Get object from database.

Parameters
int$idId of object to load
string$signatureSignature of object to load
Returns
int >0 if OK, <0 if KO, 0 if not found

Definition at line 159 of file authority.class.php.

References dol_syslog(), and ref.

◆ getBlockchainHash()

BlockedLogAuthority::getBlockchainHash ( )

Get hash of the block chain to check.

Returns
string hash md5 of blockchain

Definition at line 103 of file authority.class.php.

Referenced by checkBlockchain().

◆ getLocalBlockChain()

BlockedLogAuthority::getLocalBlockChain ( )

Get the blockchain.

Returns
string blockchain

Definition at line 79 of file authority.class.php.

◆ syncSignatureWithAuthority()

BlockedLogAuthority::syncSignatureWithAuthority ( )

For cron to sync to authority.

Returns
int Return integer <0 if KO, >0 if OK

Definition at line 291 of file authority.class.php.

References getDolGlobalString(), and getURLContent().

◆ update()

BlockedLogAuthority::update ( $user)

Create authority in database.

Parameters
User$userObject user that create
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 258 of file authority.class.php.

References dol_syslog().


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