-
-
Notifications
You must be signed in to change notification settings - Fork 119
/
Copy pathCamlQuery.php
67 lines (57 loc) · 2.05 KB
/
CamlQuery.php
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
<?php
/**
* Generated 2019-10-06T21:48:34+00:00
*/
namespace Office365\SharePoint;
use Office365\Runtime\ClientValue;
use Office365\Runtime\ServerTypeInfo;
/**
* Specifies a Collaborative Application Markup Language (CAML) query on a list or joined lists.
*/
class CamlQuery extends ClientValue
{
public static function createAllItemsQuery()
{
$qry = new CamlQuery();
$qry->ViewXml = "<View Scope=\"RecursiveAll\">\r\n <Query>\r\n </Query>\r\n</View>";
return $qry;
}
public static function createAllFoldersQuery()
{
$qry = new CamlQuery();
$qry->ViewXml = "<View Scope=\"RecursiveAll\">\r\n <Query>\r\n <Where>\r\n <Eq>\r\n <FieldRef Name=\"FSObjType\" />\r\n <Value Type=\"Integer\">1</Value>\r\n </Eq>\r\n </Where>\r\n </Query>\r\n</View>";
return $qry;
}
public static function createAllFilesQuery()
{
$qry = new CamlQuery();
$qry->ViewXml = "<View Scope='Recursive'><Query><Where><Eq><FieldRef Name='FSObjType' /><Value Type='Lookup'>0</Value></Eq></Where></Query></View>";
return $qry;
}
/**
* Gets or sets a value that indicates whether the query returns dates in Coordinated Universal Time (UTC) format.
* @var \DateTime
*/
public $DatesInUtc;
/**
* Gets or sets a value that specifies the server relative URL of a list folder from which results will be returned.
* @var string
*/
public $FolderServerRelativeUrl;
/**
* Gets or sets a value that specifies the information required to get the next page of data for the list view.
* @var ListItemCollectionPosition
*/
public $ListItemCollectionPosition;
/**
* Gets or sets value that specifies the XML schema that defines the list view.
* @var string
*/
public $ViewXml;
public $AllowIncrementalResults;
public $FolderServerRelativePath;
public function getServerTypeInfo()
{
return new ServerTypeInfo("SP", "CamlQuery");
}
}