🎨 ITopCounter : use KeyValueStore::class where possible instead of class name hardcoded in a string

This commit is contained in:
Pierre Goiffon
2021-03-18 17:50:39 +01:00
parent 9a0ea60cd7
commit 46680d3854

View File

@@ -71,8 +71,8 @@ final class ItopCounter
'key_name' => $sCounterName,
'namespace' => $sSelfClassName,
));
$oAttDef = MetaModel::GetAttributeDef('KeyValueStore', 'value');
$aAttToLoad = array('KeyValueStore' => array('value' => $oAttDef));
$oAttDef = MetaModel::GetAttributeDef(KeyValueStore::class, 'value');
$aAttToLoad = array(KeyValueStore::class => array('value' => $oAttDef));
$sSql = $oFilter->MakeSelectQuery(array(), array(), $aAttToLoad);
$hResult = mysqli_query($hDBLink, $sSql);
$aCounter = mysqli_fetch_array($hResult, MYSQLI_NUM);