Beispiel #1
0
 /**
  * @see CultureFeed_Messages::getMessage()
  */
 public function getMessage($id)
 {
     $result = $this->oauth_client->authenticatedGetAsXml('message/' . $id);
     $xmlElement = $this->validateResult($result, CultureFeed_Messages_Default::CODE_SUCCESS);
     $threadElement = $xmlElement->xpath('/response/thread');
     return CultureFeed_Messages_Message::parseFromXml($threadElement[0]);
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function financialOverviewReportStatus($report_id, $consumer_key_counter = NULL)
 {
     $params = array();
     if ($consumer_key_counter) {
         $params['balieConsumerKey'] = $consumer_key_counter;
     }
     $response_xml = $this->oauth_client->authenticatedGetAsXml("uitpas/report/financialoverview/organiser/{$report_id}/status", $params);
     $response = CultureFeed_Response::createFromResponseBody($response_xml);
     return CultureFeed_ReportStatus::createFromResponse($response);
 }
 /**
  * Get the notifications for a user.
  *
  * @param string $userId
  *   User Id to get the notifications for.
  * @param array $params
  *  Array with additional filter params
  *
  * @throws CultureFeed_ParseException
  * @return CultureFeed_ResultSet
  */
 public function getNotifications($userId, $params = array())
 {
     $result = $this->oauth_client->authenticatedGetAsXml('user/' . $userId . '/notifications', $params);
     try {
         $xmlElement = new CultureFeed_SimpleXMLElement($result);
     } catch (Exception $e) {
         throw new CultureFeed_ParseException($result);
     }
     return self::parseActivities($xmlElement);
 }
Beispiel #4
0
 /**
  * {@inheritdoc}
  */
 public function getList($allConsumers = false)
 {
     $allConsumers = $allConsumers ? 'true' : 'false';
     $result = $this->oauth_client->authenticatedGetAsXml('savedSearch/list', array('all' => $allConsumers));
     $xml_element = $this->getXmlElementFromXmlString($result);
     $saved_searches = array();
     $savedSearchesElement = $xml_element->xpath('/response/savedSearches', false);
     if (!$savedSearchesElement instanceof SimpleXMLElement) {
         $this->throwXmlElementException($xml_element, $result);
     }
     $search_elements = $savedSearchesElement->xpath('//savedSearch');
     if (!empty($search_elements)) {
         foreach ($search_elements as $search_element) {
             $search = $this->parseSavedSearch($search_element);
             $saved_searches[$search->id] = $search;
         }
     }
     return $saved_searches;
 }