Skip to content

Commit

Permalink
feat: add serialization group support (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarlovi authored Mar 5, 2021
1 parent 00aae88 commit 9500af9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Test/Model/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

namespace Xezilaires\Test\Model;

use Symfony\Component\Serializer\Annotation\Groups;
use Xezilaires\Annotation as XLS;

/**
Expand All @@ -23,6 +24,7 @@ final class Product
/**
* @var array
*
* @Groups({"array"})
* @XLS\ArrayReference({
* @XLS\ColumnReference(column="A"),
* @XLS\HeaderReference(header="Price USD")
Expand All @@ -33,13 +35,15 @@ final class Product
/**
* @var string
*
* @Groups({"column", "product"})
* @XLS\ColumnReference(column="A")
*/
public $name;

/**
* @var float|string
*
* @Groups({"header", "product"})
* @XLS\HeaderReference(header="Price USD")
*/
public $price;
Expand Down

0 comments on commit 9500af9

Please sign in to comment.