You are here

class FeedsLdapQueryFetcherResult in Lightweight Directory Access Protocol (LDAP) 7

Same name and namespace in other branches
  1. 8.2 ldap_feeds/FeedsLdapQueryFetcher.inc \FeedsLdapQueryFetcherResult
  2. 7.2 ldap_feeds/FeedsLdapQueryFetcher.inc \FeedsLdapQueryFetcherResult

FeedsLdapQueryFetcherResult

Hierarchy

Expanded class hierarchy of FeedsLdapQueryFetcherResult

File

ldap_feeds/FeedsLdapQueryFetcher.inc, line 12
FeedsLdapQueryFetcher

View source
class FeedsLdapQueryFetcherResult extends FeedsFetcherResult {
  public $query_ids = array();
  public $ldap_result;

  /**
   * Constructor.
   */
  public function __construct($source_config) {
    $this->query_ids = isset($source_config['query_ids']) && is_array($source_config['query_ids']) ? $source_config['query_ids'] : array();
    parent::__construct('');
    $this->ldap_result = $this
      ->getRaw();
    return $this->ldap_result;
  }

  /**
   * Overrides parent::getRaw();
   */
  public function getRaw() {
    $results = array();
    foreach ($this->query_ids as $i => $query_id) {
      $ldapQuery = ldap_query_get_queries($query_id, 'enabled', TRUE);
      $more_results = $ldapQuery
        ->query();
      if (is_array($more_results)) {
        $results = array_merge($results, $more_results);
      }
    }
    return $results;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FeedsFetcherResult::$file_path protected property The path to a file where the raw data is stored.
FeedsFetcherResult::$raw protected property The raw fetched data.
FeedsFetcherResult::checkFile protected function Checks that a file exists and is readable.
FeedsFetcherResult::constructFilePath public function Constructs file name for saving the raw data.
FeedsFetcherResult::fileExists public function Returns if the file to parse exists.
FeedsFetcherResult::getFeedsInProgressDir public function Returns directory for storing files that are in progress of import.
FeedsFetcherResult::getFileContents public function Returns the contents of a file, if it exists.
FeedsFetcherResult::getFilePath public function Get a path to a temporary file containing the resource provided by the fetcher. 1
FeedsFetcherResult::rawExists public function Returns if raw data exists.
FeedsFetcherResult::sanitizeFile public function Sanitize the file in place.
FeedsFetcherResult::sanitizeRaw public function Sanitize the raw content string.
FeedsFetcherResult::sanitizeRawOptimized public function Sanitize the raw content string.
FeedsFetcherResult::saveRawToFile public function Saves the raw fetcher result to a file.
FeedsFetcherResult::__sleep public function Prevent saving the raw result when serializing object.
FeedsLdapQueryFetcherResult::$ldap_result public property
FeedsLdapQueryFetcherResult::$query_ids public property
FeedsLdapQueryFetcherResult::getRaw public function Overrides parent::getRaw(); Overrides FeedsFetcherResult::getRaw
FeedsLdapQueryFetcherResult::__construct public function Constructor. Overrides FeedsFetcherResult::__construct