public function getProperty($propName, $groupId = null)
{
$keyId = $this->getKeyId($propName, $groupId);
$result = [];
// the key name is valid, now iterate over the object's pairs
$propsWithInheritance = $this->getProperties();
foreach ($propsWithInheritance as $pair) {
if ($pair["key"] == $keyId) {
$result[] = new Object\Data\KeyValue\Entry($pair["value"], $pair["translated"], $pair["metadata"]);
}
}
$count = count($result);
if ($count == 0) {
return null;
} elseif ($count == 1) {
return $result[0];
} else {
return $result;
}
}