1<?php
2
3declare(strict_types=1);
4
5namespace JMS\Serializer\Tests\Fixtures;
6
7use JMS\Serializer\Annotation\Type;
8use JMS\Serializer\Annotation\XmlElement;
9use JMS\Serializer\Annotation\XmlNamespace;
10use JMS\Serializer\Annotation\XmlRoot;
11
12/**
13 * @XmlRoot("property:test-object", namespace="http://example.com/namespace-property")
14 * @XmlNamespace(uri="http://example.com/namespace-property", prefix="property")
15 */
16class ObjectWithXmlNamespacesAndObjectProperty
17{
18    /**
19     * @Type("string")
20     * @XmlElement(namespace="http://example.com/namespace-property");
21     */
22    private $title;
23
24    /**
25     * @Type("JMS\Serializer\Tests\Fixtures\ObjectWithXmlNamespacesAndObjectPropertyAuthor")
26     * @XmlElement(namespace="http://example.com/namespace-property")
27     */
28    private $author;
29
30    public function __construct($title, $author)
31    {
32        $this->title = $title;
33        $this->author = $author;
34    }
35}
36