<?php $orgs = $entityAry['orgs']; ?> <?php unset($entityAry['orgs']); ?> <?php echo LsDataFormat::toXml($entityAry['entity']); ?> <Orgs> <?php foreach ($orgs as $org) { ?> <?php echo LsDataFormat::toXml($org, 'Entity'); ?> <?php $orgAry[$org['id']] = true; ?> <?php } ?> </Orgs> </Entity> <?php } ?> </Entities> <?php
<?php echo LsDataFormat::toXml($entity, 'Entity'); ?> <ChildOrgs> <?php foreach ($child_orgs as $child) { ?> <?php echo LsDataFormat::toXml($child, 'ChildOrg'); } ?> </ChildOrgs> <?php slot('num_results', array('ChildOrgs' => count($child_orgs)));
<?php echo LsDataFormat::toXml($entity, 'Entity'); ?> <Lists> <?php foreach ($lists as $list) { ?> <?php echo LsDataFormat::toXml($list, 'List'); } ?> </Lists> <?php slot('num_results', array('Lists' => count($lists)));
<Entity> <?php echo LsDataFormat::toXml($entity); ?> <Aliases> <?php foreach ($aliases as $alias) { ?> <Alias><?php echo LsDataFormat::toXml($alias); ?> </Alias> <?php } ?> </Aliases> </Entity>
<?php $refs = $rel['References']; ?> <?php unset($rel['References']); ?> <Relationship> <?php echo LsDataFormat::toXml($rel); ?> <References> <?php foreach ($refs as $ref) { ?> <?php echo LsDataFormat::toXml($ref, 'Reference'); ?> <?php $refCount++; ?> <?php } ?> </References> </Relationship> <?php } ?> </Relationships> <?php
<?php echo LsDataFormat::toXml($entity, 'Entity'); ?> <Relationships> <?php foreach ($rels as $rel) { ?> <?php echo LsDataFormat::toXml($rel, 'Relationship'); } ?> </Relationships> <?php slot('num_results', array('Relationships' => count($rels)));
<RelationshipCategories> <?php foreach ($categories as $category) { ?> <?php echo LsDataFormat::toXml($category, 'RelationshipCategory'); } ?> </RelationshipCategories>
<?php echo LsDataFormat::toXml($entity, 'Entity'); ?> <Images> <?php foreach ($images as $image) { ?> <?php echo LsDataFormat::toXml($image, 'Image'); } ?> </Images> <?php slot('num_results', array('Images' => count($images)));
?> <Relationship> <?php $relatedEntity = $rel['entity1_id'] == $entity['id'] ? $rel['Entity2'] : $rel['Entity1']; ?> <?php unset($rel['Entity1']); ?> <?php unset($rel['Entity2']); ?> <?php echo LsDataFormat::toXml($rel); ?> <?php echo LsDataFormat::toXml($relatedEntity, 'RelatedEntity'); ?> <?php $entities[$relatedEntity['id']] = 1; ?> <?php $categories[$rel['category_id']] = 1; ?> </Relationship> <?php } ?> </Relationships> <?php slot('num_results', array('RelatedEntities' => count($entities), 'Relationships' => count($relationships), 'RelationshipCategories' => count($categories)));
<?php echo LsDataFormat::toXml($list, 'List'); ?> <Entities> <?php foreach ($entities as $entity) { ?> <?php echo LsDataFormat::toXml($entity, 'Entity'); } ?> </Entities> <?php slot('num_results', array('Entities' => count($entities)));
<Entities> <?php foreach ($entities as $entity) { ?> <?php echo LsDataFormat::toXml(LsApi::filterResponseFields($entity, 'Entity'), 'Entity'); } ?> </Entities> <?php slot('num_results', array('Entities' => count($entities)));
<EntityTypes> <?php foreach ($types as $type) { ?> <?php echo LsDataFormat::toXml($type, 'EntityType'); } ?> </EntityTypes>
<Relationship> <?php echo LsDataFormat::toXml($relationship); ?> <?php echo LsDataFormat::toXml($entity1, 'Entity1'); ?> <?php echo LsDataFormat::toXml($entity2, 'Entity2'); ?> </Relationship>
<Lists> <?php foreach ($lists as $list) { ?> <List> <?php $num = $list['num_entities']; ?> <?php echo LsDataFormat::toXml(LsApi::filterResponseFields($list, 'LsList')); ?> <num_entities><?php echo $num; ?> </num_entities> </List> <?php } ?> </Lists> <?php slot('num_results', array('Lists' => count($lists)));
<List> <?php echo LsDataFormat::toXml($list); ?> </List>