dolibarr  19.0.0-dev
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 64 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 123 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 135 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 111 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 212 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 159 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 99 of file authority.class.php.

◆ getLocalBlockChain()

BlockedLogAuthority::getLocalBlockChain ( )

Get the blockchain.

Returns
string blockchain

Definition at line 74 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 294 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 260 of file authority.class.php.


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