dolibarr  9.0.0
Public Member Functions | List of all members
BlockedLogAuthority Class Reference

Class to manage certif authority. More...

Public Member Functions

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

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 53 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 110 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 122 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 98 of file authority.class.php.

◆ create()

BlockedLogAuthority::create (   $user)

Create authority in database.

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

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

◆ 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 145 of file authority.class.php.

◆ getBlockchainHash()

BlockedLogAuthority::getBlockchainHash ( )

Get hash of the block chain to check.

Returns
string hash md5 of blockchain

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

◆ getLocalBlockChain()

BlockedLogAuthority::getLocalBlockChain ( )

Get the blockchain.

Returns
string blockchain

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

◆ syncSignatureWithAuthority()

BlockedLogAuthority::syncSignatureWithAuthority ( )

For cron to sync to authority.

Returns
int <0 if KO, >0 if OK

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

◆ update()

BlockedLogAuthority::update (   $user)

Create authority in database.

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

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


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