/** * {@inheritdoc} */ protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = array()) { if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) { return false; } try { $reflectionProperty = new \ReflectionProperty(is_string($classOrObject) ? $classOrObject : get_class($classOrObject), $attribute); if ($reflectionProperty->isStatic()) { return false; } } catch (\ReflectionException $reflectionException) { return false; } return true; }
/** * {@inheritdoc} */ public function supportsDenormalization($data, $type, $format = null) { return parent::supportsDenormalization($data, $type, $format) && $this->supports($type); }