Skip to content

[Serializer][XMLEncoder] add a way to Annotate/Attribute the ROOT_NODE_NAME on a Class #51652

Open
@Hanmac

Description

@Hanmac

Description

add a new Annotation/Attribute to mark the XMLEncoder::ROOT_NODE_NAME on a class

Annotation\Context can't be used for this because that can't be tagged in classes (yet)

Example

/*
 * @RootNodeName("product")
 */
class Product
{
   public $name;
   public $price;
}

results in:

<product>
  <name></name>
  <price></price>
</product>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions