|
@@ 460-465 (lines=6) @@
|
| 457 |
|
$this->_xmlWriter->startElement(ODataConstants::ENTITY_CONTAINER); |
| 458 |
|
$this->_xmlWriter->writeAttribute(ODataConstants::NAME, $this->providersWrapper->getContainerName()); |
| 459 |
|
$this->_xmlWriter->writeAttributeNs(ODataConstants::ODATA_METADATA_NAMESPACE_PREFIX, ODataConstants::ISDEFAULT_ENTITY_CONTAINER_ATTRIBUTE, null, 'true'); |
| 460 |
|
foreach ($this->_metadataManager->getResourceSets() as $resourceSet) { |
| 461 |
|
$this->_xmlWriter->startElement(ODataConstants::ENTITY_SET); |
| 462 |
|
$this->_xmlWriter->writeAttribute(ODataConstants::NAME, $resourceSet->getName()); |
| 463 |
|
$this->_xmlWriter->writeAttribute(ODataConstants::ENTITY_TYPE, $resourceSet->getResourceType()->getFullName()); |
| 464 |
|
$this->_xmlWriter->endElement(); |
| 465 |
|
} |
| 466 |
|
|
| 467 |
|
$this->_writeAssociationSets(); |
| 468 |
|
$this->_xmlWriter->endElement(); |
|
@@ 476-482 (lines=7) @@
|
| 473 |
|
*/ |
| 474 |
|
private function _writeAssociationSets() |
| 475 |
|
{ |
| 476 |
|
foreach ($this->_metadataManager->getAssociationSets() as $associationSetName => $associationSet) { |
| 477 |
|
$this->_xmlWriter->startElement(ODataConstants::ASSOCIATION_SET); |
| 478 |
|
$this->_xmlWriter->writeAttribute(ODataConstants::NAME, $associationSetName); |
| 479 |
|
$this->_xmlWriter->writeAttribute(ODataConstants::ASSOCIATION, $associationSet->resourceAssociationType->getFullName()); |
| 480 |
|
$this->_writeAssocationSetEnds($associationSet); |
| 481 |
|
$this->_xmlWriter->endElement(); |
| 482 |
|
} |
| 483 |
|
} |
| 484 |
|
|
| 485 |
|
/** |