RepositoryService.inc.php
2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
/**
* CMIS Service class which hooks into the KnowledgeTree interface
* for processing of CMIS queries and responses via atompub/webservices
*/
require_once KT_LIB_DIR . '/api/ktcmis/ktRepositoryService.inc.php';
class RepositoryService extends KTRepositoryService {
/**
* Fetches a list of available repositories
*
* @return cmisRepositoryEntryType[]
*/
public function getRepositories()
{
$result = parent::getRepositories();
if ($result['status_code'] == 0)
{
return $result['results'];
}
}
/**
* Fetches information about the selected repository
*
* @param string $repositoryId
* @return cmisRepositoryInfoType
*/
public function getRepositoryInfo($repositoryId)
{
$result = parent::getRepositoryInfo($repositoryId);
if ($result['status_code'] == 0)
{
return $result['results'];
}
}
/**
* Fetch the list of supported object types for the selected repository
*
* @param string $repositoryId The ID of the repository for which object types must be returned
* @param string $typeId The type to return, ALL if not set
* @param boolean $returnPropertyDefinitions Return property definitions as well if TRUE
* @param int $maxItems The maximum number of items to return
* @param int $skipCount The number of items to skip before starting to return results
* @param boolean $hasMoreItems TRUE if there are more items to return than were requested
* @return cmisTypeDefinitionType[]
*/
public function getTypes($repositoryId, $typeId = '', $returnPropertyDefinitions = false,
$maxItems = 0, $skipCount = 0, &$hasMoreItems = false)
{
$result = parent::getTypes($repositoryId, $typeId, $returnPropertyDefinitions,
$maxItems, $skipCount, $hasMoreItems);
if ($result['status_code'] == 0)
{
return $result['results'];
}
}
/**
* Fetch the object type definition for the requested type
*
* @param string $repositoryId
* @param string $typeId
* @return cmisTypeDefinitionType
*/
public function getTypeDefinition($repositoryId, $typeId)
{
$result = parent::getTypeDefinition($repositoryId, $typeId);
if ($result['status_code'] == 0)
{
return $result['results'];
}
}
}
?>