Author: richardm
Date: Sat Jan 22 15:58:47 2011
New Revision: 1062182

URL: http://svn.apache.org/viewvc?rev=1062182&view=rev
Log:
Patch for CMIS-288 need to be able to read total number of available items from 
feed
Patch from      Stefan Topfstedt

Modified:
    incubator/chemistry/phpclient/trunk/cmis_repository_wrapper.php

Modified: incubator/chemistry/phpclient/trunk/cmis_repository_wrapper.php
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/phpclient/trunk/cmis_repository_wrapper.php?rev=1062182&r1=1062181&r2=1062182&view=diff
==============================================================================
--- incubator/chemistry/phpclient/trunk/cmis_repository_wrapper.php (original)
+++ incubator/chemistry/phpclient/trunk/cmis_repository_wrapper.php Sat Jan 22 
15:58:47 2011
@@ -482,7 +482,12 @@ class CMISRepositoryWrapper
         //   Provides two arrays 
         //   -- one sequential array (a list)
         //   -- one hash table indexed by objectID
+        //   and a property "numItems" that holds the total number of items 
available.
         $retval = new stdClass();
+        // extract total number of items
+        $numItemsNode = CMISRepositoryWrapper::doXQueryFromNode($xmlnode, 
"/atom:feed/cmisra:numItems");
+        $retval->numItems = $numItemsNode->length ? (int) 
$numItemsNode->item(0)->nodeValue : -1; // set to negative value if info is not 
available
+                
         $retval->objectList = array ();
         $retval->objectsById = array ();
         $result = CMISRepositoryWrapper :: doXQueryFromNode($xmlnode, 
"/atom:feed/atom:entry");


Reply via email to