Exemplo n.º 1
0
 /**
  * {@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;
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function supportsDenormalization($data, $type, $format = null)
 {
     return parent::supportsDenormalization($data, $type, $format) && $this->supports($type);
 }