getChildren($id)->objectList as $item) { $typ = substr($item->properties['cmis:objectTypeId'], 5); echo sprintf("%s%s (%s)\r\n", $indent, $item->properties['cmis:name'], $typ); if($showprops) { $props = $item->properties; foreach($props as $pk => $pv) { echo sprintf("%s- %s = %s\r\n", $indent, $pk, $pv); } } if($recurse && $typ == 'folder') { listf($indent . ' ', $client, $item->properties['cmis:objectId'], $recurse, $showprops); } } } function test($url, $usr, $pwd, $reponam, $recurse, $showprops) { $client = new CMISService($url, $usr, $pwd); echo $client->getRepositoryInfo()->repositoryInfo['cmis:repositoryName'] . "\r\n"; echo $client->getRepositoryInfo()->repositoryInfo['cmis:repositoryDescription'] . "\r\n"; echo $client->getRepositoryInfo()->repositoryInfo['cmis:productName'] . "\r\n"; echo $client->getRepositoryInfo()->repositoryInfo['cmis:productVersion'] . "\r\n"; listf('', $client, $client->getObjectByPath('/')->id, $recurse, $showprops); } test('http://localhost:8080/chemistry/atom', 'test', 'test', 'test', true, true); test('http://localhost:8080/opencms/cmisatom', 'Admin', 'admin', 'cmis-online', false, false) ?>