We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a part of XML as follows:
<results xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" for="XXX"> <opensearch:Query role="request" searchTerms="XXX" startPage="1"/> <opensearch:totalResults>2</opensearch:totalResults> <opensearch:startIndex>0</opensearch:startIndex> <opensearch:itemsPerPage>50</opensearch:itemsPerPage> <albummatches> <album>
Is it possible to skip albummatches element and set something like?
albummatches
/** * @JMS\Type("array<XXX>") * @JMS\XmlList(inline=true, entry="albummatches\album") * @var XXX[] */ protected $items;
Or I must implement additional class for albummatches to have something like:
class Results { /** * @JMS\Type("array<\AlbumCollection>") */ private $albummatches; /** * @return \AlbumCollection */ public function getAlbummatches() { return $this->albummatches; } } /** * @JMS\XmlRoot("album") */ class AlbumCollection extends ArrayCollection { /** * @JMS\Type("array<\Album>") * @JMS\XmlList(inline=true, entry="album") * @var \Album[] */ protected $items; } class Album { // ... }
The text was updated successfully, but these errors were encountered:
Anyway to do that? Or the medium class is still needed for correct work?
Sorry, something went wrong.
sorry for the long feedback loop. the answer for your question is to use inline=false
inline=false
No branches or pull requests
I have a part of XML as follows:
Is it possible to skip
albummatches
element and set something like?Or I must implement additional class for
albummatches
to have something like:The text was updated successfully, but these errors were encountered: