src/Hydra/Serializer/DocumentationNormalizer.php
private function computeDoc(Documentation $object, array $classes): array
    {
        $doc = ['@context' => $this->getContext(), '@id' => $this->urlGenerator->generate('api_doc', ['_format' => self::FORMAT]), '@type' => 'hydra:ApiDocumentation'];

        if ('' !== $object->getTitle()) {
            $doc['hydra:title'] = $object->getTitle();
        }

        if ('' !== $object->getDescription()) {
            $doc['hydra:description'] = $object->getDescription();
        }

        $doc['hydra:entrypoint'] = $this->urlGenerator->generate('api_entrypoint');
        $doc['hydra:supportedClass'] = $classes;

        return $doc;
    }
private function computeDoc(Documentation $object, array $classes): array
    {
        $doc = ['@context' => $this->getContext(), '@id' => $this->urlGenerator->generate('api_doc', ['_format' => self::FORMAT]), '@type' => 'hydra:ApiDocumentation'];

        if ('' !== $object->getTitle()) {
            $doc['hydra:title'] = $object->getTitle();
        }

        if ('' !== $object->getDescription()) {
            $doc['hydra:description'] = $object->getDescription();
        }

        $doc['hydra:entrypoint'] = $this->urlGenerator->generate('api_entrypoint');
        $doc['hydra:supportedClass'] = $classes;

        return $doc;
    }
private function computeDoc ( Documentation $ object , array $ classes ) : array { $ doc = [ '@context' => $ this -> getContext ( ) , '@id' => $ this -> urlGenerator -> generate ( 'api_doc' , [ '_format' => self :: FORMAT ] ) , '@type' => 'hydra:ApiDocumentation' ] ; if ( '' !== $ object -> getTitle ( ) ) { $ doc [ 'hydra:title' ] = $ object -> getTitle ( ) ; } if ( '' !== $ object -> getDescription ( ) ) { $ doc [ 'hydra:description' ] = $ object -> getDescription ( ) ; } $ doc [ 'hydra:entrypoint' ] = $ this -> urlGenerator -> generate ( 'api_entrypoint' ) ; $ doc [ 'hydra:supportedClass' ] = $ classes ; return $ doc ; }
Computes the documentation.
Computes the documentation .