final public function getAllowedDataFromRequest(array $requestParams, $httpMethod)
    {
        if (in_array($httpMethod, ['PATCH', 'PUT'])) {
            $properties = $this->getModifiableProperties();
        } elseif ($httpMethod === 'POST') {
            $properties = $this->getWritableProperties();
        } else {
            return [];
        }

        $data = [];
        if (false === empty($properties)) {
            foreach ($properties as $property) {
                $lcProperty = lcfirst($property);
                if (array_key_exists($lcProperty, $requestParams)) {
                    $data[$property] = $requestParams[$lcProperty];
                }
            }
        }

        return $data;
    }