Quellcode durchsuchen

xml reference updated with virtual-property example

Paulo Ribeiro vor 11 Jahren
Ursprung
Commit
1f38de9a30
1 geänderte Dateien mit 27 neuen und 0 gelöschten Zeilen
  1. 27 0
      doc/reference/xml_reference.rst

+ 27 - 0
doc/reference/xml_reference.rst

@@ -41,5 +41,32 @@ XML Reference
             <callback-method name="baz" type="post-deserialize" />
             <callback-method name="serializeToXml" type="handler" direction="serialization" format="xml" />
             <callback-method name="deserializeFromJson" type="handler" direction="deserialization" format="xml" />
+
+            <virtual-property method="public_method"
+                      name="some-property"
+                      exclude="true"
+                      expose="true"
+                      type="string"
+                      serialized-name="foo"
+                      since-version="1.0"
+                      until-version="1.1"
+                      xml-attribute="true"
+                      access-type="public_method"
+                      accessor-getter="getSomeProperty"
+                      accessor-setter="setSomeProperty"
+                      inline="true"
+                      read-only="true"
+                      groups="foo,bar"
+                      xml-key-value-pairs="true"
+                      xml-attribute-map="true"
+                      max-depth="2"
+            >
+                <!-- You can also specify the type as element which is necessary if
+                     your type contains "<" or ">" characters. -->
+                <type><![CDATA[]]></type>
+                <xml-list inline="true" entry-name="foobar" />
+                <xml-map inline="true" key-attribute-name="foo" entry-name="bar" />
+            </virtual-property>
+            
         </class>
     </serializer>