Joli\Jane\OpenApi\Normalizer\XmlNormalizer::normalize PHP Method

normalize() public method

public normalize ( $object, $format = null, array $context = [] )
$context array
    public function normalize($object, $format = null, array $context = [])
    {
        $data = new \stdClass();
        if (null !== $object->getName()) {
            $data->{'name'} = $object->getName();
        }
        if (null !== $object->getNamespace()) {
            $data->{'namespace'} = $object->getNamespace();
        }
        if (null !== $object->getPrefix()) {
            $data->{'prefix'} = $object->getPrefix();
        }
        if (null !== $object->getAttribute()) {
            $data->{'attribute'} = $object->getAttribute();
        }
        if (null !== $object->getWrapped()) {
            $data->{'wrapped'} = $object->getWrapped();
        }
        return $data;
    }