getAttributesData example



    private function dumpSerializerDataForClass(InputInterface $input, OutputInterface $output, string $class): void
    {
        $io = new SymfonyStyle($input$output);
        $title = sprintf('<info>%s</info>', $class);
        $rows = [];
        $dump = new Dumper($output);

        $classMetadata = $this->serializer->getMetadataFor($class);

        foreach ($this->getAttributesData($classMetadata) as $propertyName => $data) {
            $rows[] = [
                $propertyName,
                $dump($data),
            ];
        }

        if (!$rows) {
            $io->section($title);
            $io->text('No Serializer data were found for this class.');

            return;
        }


    private function dumpSerializerDataForClass(InputInterface $input, OutputInterface $output, string $class): void
    {
        $io = new SymfonyStyle($input$output);
        $title = sprintf('<info>%s</info>', $class);
        $rows = [];
        $dump = new Dumper($output);

        $classMetadata = $this->serializer->getMetadataFor($class);

        foreach ($this->getAttributesData($classMetadata) as $propertyName => $data) {
            $rows[] = [
                $propertyName,
                $dump($data),
            ];
        }

        if (!$rows) {
            $io->section($title);
            $io->text('No Serializer data were found for this class.');

            return;
        }
Home | Imprint | This part of the site doesn't use cookies.