N°4756 - Ease extensibility for CRUD operations : Event Service

This commit is contained in:
Eric Espie
2022-12-07 16:25:16 +01:00
parent bdebea62b6
commit c02f84969a
3 changed files with 5 additions and 10 deletions

View File

@@ -3205,9 +3205,4 @@ HTML;
{
return in_array($sTrait, self::TraitsUsedByClass($sClass, true));
}
public static function GetUniqId()
{
return hash('sha256', uniqid(sprintf('%x', rand()), true).sprintf('%x', rand()));
}
}

View File

@@ -131,15 +131,15 @@ class Config
],
'event_service.debug.filter_events' => [
'type' => 'array',
'description' => 'Filter Event Service debug by events',
'default' => '',
'description' => 'List of events name to filter Event Service debug messages',
'default' => [],
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
],
'event_service.debug.filter_sources' => [
'type' => 'array',
'description' => 'Filter Event Service debug by event sources',
'description' => 'List of event sources to filter Event Service debug messages',
'default' => '',
'value' => '',
'source_of_value' => '',

View File

@@ -180,7 +180,7 @@ abstract class DBObject implements iDisplay
$this->m_bFullyLoaded = $this->IsFullyLoaded();
$this->m_aTouchedAtt = array();
$this->m_aModifiedAtt = array();
$this->m_sObjectUniqId = get_class($this).'::'.$this->GetKey().'_'.utils::GetUniqId();
$this->m_sObjectUniqId = get_class($this).'::'.$this->GetKey().'_'.uniqId('', true);
$this->RegisterEventListeners();
return;
}
@@ -203,7 +203,7 @@ abstract class DBObject implements iDisplay
$this->UpdateMetaAttributes();
$this->m_sObjectUniqId = get_class($this).'::0'.'_'.utils::GetUniqId();
$this->m_sObjectUniqId = get_class($this).'::0'.'_'.uniqId('', true);
$this->RegisterEventListeners();
}