8
8
use Office365 \PHP \Client \Runtime \OData \ODataQueryOptions ;
9
9
use Office365 \PHP \Client \Runtime \Utilities \Guid ;
10
10
use Office365 \PHP \Client \Runtime \Utilities \RequestOptions ;
11
- use Office365 \PHP \Client \Runtime \Utilities \Requests ;
12
11
13
12
14
13
/**
@@ -69,10 +68,8 @@ public function __construct(ClientRuntimeContext $context)
69
68
*/
70
69
public function addQuery (ClientAction $ query , $ resultObject = null )
71
70
{
72
- if (isset ($ resultObject )) {
73
- $ queryId = $ query ->getId ();
74
- $ this ->resultObjects [$ queryId ] = $ resultObject ;
75
- }
71
+ $ queryId = $ query ->getId ();
72
+ $ this ->resultObjects [$ queryId ] = $ resultObject ;
76
73
$ this ->queries [] = $ query ;
77
74
}
78
75
@@ -98,6 +95,14 @@ public function afterExecuteQuery(callable $event)
98
95
public abstract function executeQuery ();
99
96
100
97
98
+ /**
99
+ * @param RequestOptions $request
100
+ * @return ClientResponse
101
+ * @throws Exception
102
+ */
103
+ public abstract function executeQueryDirect (RequestOptions $ request );
104
+
105
+
101
106
/**
102
107
* @param RequestOptions $request
103
108
*/
@@ -110,7 +115,7 @@ protected abstract function setRequestHeaders(RequestOptions $request);
110
115
public abstract function processResponse ($ response );
111
116
112
117
/**
113
- * Build Client Request
118
+ * Build Request
114
119
* @return RequestOptions
115
120
*/
116
121
protected abstract function buildRequest ();
@@ -126,19 +131,6 @@ public function addQueryAndResultObject(ClientObject $clientObject, ODataQueryOp
126
131
}
127
132
128
133
129
- /**
130
- * @param RequestOptions $request
131
- * @param array $responseInfo
132
- * @return string
133
- * @throws Exception
134
- */
135
- public function executeQueryDirect (RequestOptions $ request , &$ responseInfo = array ())
136
- {
137
- $ this ->context ->authenticateRequest ($ request ); //Auth mandatory headers
138
- $ this ->setRequestHeaders ($ request ); //set request headers
139
- return Requests::execute ($ request ,$ responseInfo );
140
- }
141
-
142
134
/**
143
135
* @return ClientAction[]
144
136
*/
0 commit comments