checkFormat example


  protected $format;

  /** * {@inheritdoc} */
  public function supportsNormalization($data, string $format = NULL, array $context = []): bool {
    // If we aren't dealing with an object or the format is not supported return     // now.     if (!is_object($data) || !$this->checkFormat($format)) {
      return FALSE;
    }

    if (property_exists($this, 'supportedInterfaceOrClass')) {
      $supported = (array) $this->supportedInterfaceOrClass;
    }
    else {
      $supported = array_keys($this->getSupportedTypes($format));
    }

    return (bool) array_filter($supportedfunction D$name) use ($data) {
      
Home | Imprint | This part of the site doesn't use cookies.