dolibarr  7.0.0-beta
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

BlockedLogAuthority::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

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

Member Function Documentation

BlockedLogAuthority::addBlock (   $block)

Add a new block to the chain.

Parameters
string$blocknew block to chain

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

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.

BlockedLogAuthority::checkBlockchain (   $hash)

Get hash of the block chain to check.

Parameters
string$hashhash md5 of blockchain to test
Returns
boolean

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

References getBlockchainHash().

BlockedLogAuthority::create (   $user)

Create authority in database.

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

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

References dol_syslog().

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

References $resql, and dol_syslog().

BlockedLogAuthority::getBlockchainHash ( )

Get hash of the block chain to check.

Returns
string hash md5 of blockchain

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

Referenced by checkBlockchain().

BlockedLogAuthority::getLocalBlockChain ( )

Get the blockchain.

Returns
string blockchain

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

BlockedLogAuthority::syncSignatureWithAuthority ( )

For cron to sync to authority.

Returns
int <0 if KO, >0 if OK

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

BlockedLogAuthority::update (   $user)

Create authority in database.

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

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

References dol_syslog().


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