You are here

static function CMISRepositoryWrapper::extractObjectFeedFromNode in CMIS API 6.3

Same name and namespace in other branches
  1. 6.4 cmis_common/lib/cmis_repository_wrapper.php \CMISRepositoryWrapper::extractObjectFeedFromNode()
  2. 7 cmis_common/lib/cmis_repository_wrapper.php \CMISRepositoryWrapper::extractObjectFeedFromNode()
1 call to CMISRepositoryWrapper::extractObjectFeedFromNode()
CMISRepositoryWrapper::extractObjectFeed in cmis_common/lib/cmis_repository_wrapper.php

File

cmis_common/lib/cmis_repository_wrapper.php, line 279

Class

CMISRepositoryWrapper

Code

static function extractObjectFeedFromNode($xmlnode) {

  // Process a feed and extract the objects
  //   Does not handle hierarchy
  //   Provides two arrays
  //   -- one sequential array (a list)
  //   -- one hash table indexed by objectID
  $retval = new stdClass();
  $retval->objectList = array();
  $retval->objectsById = array();
  $result = CMISRepositoryWrapper::doXQueryFromNode($xmlnode, "//atom:entry");
  foreach ($result as $node) {
    $obj = CMISRepositoryWrapper::extractObjectFromNode($node);
    $retval->objectsById[$obj->id] = $obj;
    $retval->objectList[] =& $retval->objectsById[$obj->id];
  }
  return $retval;
}