- public function supportsDenormalization($data, $type, $format = NULL) {
- if (in_array($format, $this->formats) && (class_exists($this->supportedInterfaceOrClass) || interface_exists($this->supportedInterfaceOrClass))) {
- $target = new \ReflectionClass($type);
- $supported = new \ReflectionClass($this->supportedInterfaceOrClass);
- if ($supported->isInterface()) {
- return $target->implementsInterface($this->supportedInterfaceOrClass);
- }
- else {
- return ($target->getName() == $this->supportedInterfaceOrClass || $target->isSubclassOf($this->supportedInterfaceOrClass));
- }
+ protected function checkFormat($format = NULL) {
+ if (isset($this->formats)) {
+ @trigger_error('::formats is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Use ::$format instead. See https://www.drupal.org/node/2868275', E_USER_DEPRECATED);
+
+ $this->format = $this->formats;