LSattr_ldap::compositeValueToJSON: use static instead of self keyword

Use static instead of self keyword to use static method. This permit to 
easily override this class.
This commit is contained in:
Benjamin Renard 2020-12-02 16:37:41 +01:00
parent bc462c07b6
commit 2161cc701a

View file

@ -39,7 +39,7 @@ class LSattr_ldap_compositeValueToJSON extends LSattr_ldap {
public function getDisplayValue($data) {
$ret = array();
foreach(ensureIsArray($data) as $key => $val)
$ret[$key] = json_encode(self :: parseValue($val));
$ret[$key] = json_encode(static :: parseValue($val));
return $ret;
}
@ -53,7 +53,7 @@ class LSattr_ldap_compositeValueToJSON extends LSattr_ldap {
public function getUpdateData($data) {
$ret = array();
foreach(ensureIsArray($data) as $key => $val)
$ret[$key] = self :: encodeValue(json_decode($val, true));
$ret[$key] = static :: encodeValue(json_decode($val, true));
return $ret;
}