getCollectorResponse

@param int $collectorId
@param int $responseId
@param bool $detailed

@return @see Client::sendRequest
966291
public function getCollectorResponse($collectorId, $responseId, $detailed = false)
	{
		if ($detailed) {
			return $this->sendRequest(
				$this->createRequest('GET', sprintf('collectors/%d/responses/%d', $collectorId, $responseId))
			);
		} else {
			return $this->sendRequest(
				$this->createRequest('GET', sprintf('collectors/%d/responses/%d/details', $collectorId, $responseId))
			);
		}
	}
1290858
public static function getCollectionTopics(Collection $collection) {
		$url = self::getTopicsUrl($collection);

		$response = Client::GET($url, self::getHeaders($collection));

		$body = self::getDataFromResponse($response);
		if (!property_exists($body, "topicIds")) {
			return null;
		}

		return $body->{"topicIds"};
	}
212454
@Override
	public List<Scope>  getScopesByCollector(ObjectId collectorId) {
		List<Scope> scopes = scopeRepository.findByCollectorId(collectorId);

		//clean up needed for < > characters
		for (Scope scope : scopes) {
			scope.setName(  scope.getName().replaceAll("[<>]", "")  );
			scope.setProjectPath(  scope.getProjectPath().replaceAll("[<>]", "")  );
		}

		return scopes;
	}
737948
function fetchCollectionAttributeHTTPInput( $collection, $collectionAttribute, $http, $base, $contentObjectAttribute )
    {
        if ( $http->hasPostVariable( $base . "_category_id_" . $contentObjectAttribute->attribute( "id" ) ))
        {
            $data = $http->postVariable( $base . "_category_id_" . $contentObjectAttribute->attribute( "id" ) );
            if ( !is_numeric( $data ) )
                $data = 0;
        }
        else
        {
            $data = 0;
        }

        $collectionAttribute->setAttribute( 'data_int', $data );
        return true;
    }
271762
public function getResponseCollection(float $timeout = 0): ResponseCollection
    {
        if ($timeout < $this->timeout) {
            $timeout = $this->timeout;
        }

        $now = microtime(true);
        $responseCollection = new JsonRpcResponseCollection();

        do {
            $message = $this->queue->get(Constants::AMQP_AUTOACK);

            if ($message instanceof Envelope) {
                $responseCollection->addResponse($this->responseFromEnvelope($message));
            } else {
                usleep($this->waitMillis * 1000);
            }
            $time = microtime(true);
        } while (
            $responseCollection->count() < $this->countRequests
            && (0 == $timeout || ($timeout > 0 && (($time - $now) < $timeout)))
        );

        $this->requestIds = [];
        $this->timeout = 0;
        $this->countRequests = 0;

        return $responseCollection;
    }
263344
public function createCollectorMessage($collectorId, array $data = [])
	{
		return $this->sendRequest(
			$this->createRequest('POST', sprintf('collectors/%s/messages', $collectorId), [], $data)
		);
	}
91138
public function collectionExists($collectionId, int $status): bool
    {
        $query = $this->connection->createQueryBuilder();
        $query->select('count(*) AS count')
            ->from('ngbm_collection')
            ->where(
                $query->expr()->eq('id', ':id')
            )
            ->setParameter('id', $collectionId, Type::INTEGER);

        $this->applyStatusCondition($query, $status);

        $data = $query->execute()->fetchAll(PDO::FETCH_ASSOC);

        return (int) ($data[0]['count'] ?? 0) > 0;
    }
712664
function (collectionV1) {
        var self = this,
            requestsCache = _.keyBy(collectionV1.requests, 'id'),
            allRequests = _.map(collectionV1.requests, 'id'),
            result;

        self.cache = requestsCache;
        result = self.itemGroups(collectionV1);

        _.forEach(_.intersection(collectionV1.order, allRequests), function (requestId) {
            var request = self.singleItem(requestsCache[requestId]);

            request && (result.push(request));
        });

        return result;
    }
690521
private function insertResponseCollectionIntoData(Response $response, $collectionName, array &$data)
    {
        $property = 'cache' . ucfirst($collectionName);
        if ($this->{$property} === false) {
            return;
        }

        $collection = $response->{$collectionName};
        $all = is_array($collection) ? $collection : $collection->toArray();
        if (is_array($this->{$property})) {
            $filtered = [];
            foreach ($this->{$property} as $name) {
                if ($collectionName === 'headers') {
                    $name = strtolower($name);
                }
                if (isset($all[$name])) {
                    $filtered[$name] = $all[$name];
                }
            }
            $all = $filtered;
        }
        $data[$collectionName] = $all;
    }
1293448
public function getCollection($collectionName)
    {
        $this->initialize();

        return isset($this->collections[$collectionName]) ? $this->collections[$collectionName] : null;
    }
152945
function collectInformation( $collection, &$collectionAttribute, $http, $base )
    {
        $dataType = $this->dataType();
        if ( $dataType )
        {
            $collectionAttribute->setAttribute( 'contentclass_attribute_id', $this->attribute( 'contentclassattribute_id' ) );
            $collectionAttribute->setAttribute( 'contentobject_attribute_id', $this->attribute( 'id' ) );
            $collectionAttribute->setAttribute( 'contentobject_id', $this->attribute( 'contentobject_id' ) );
            return $dataType->fetchCollectionAttributeHTTPInput( $collection, $collectionAttribute, $http, $base, $this );
        }

        return false;
    }
443759
public function set($collectionId, EntityCollectionInterface $collection)
    {
        $this->getCache()->set($collectionId, $collection);
        return $this;
    }
976853
public function get($customCollectionId, array $fields = array())
    {
        $params = array();
        if (!empty($fields)) {
            $params['fields'] = $fields;
        }
        $endpoint = '/admin/custom_collections/'.$customCollectionId.'.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createObject(CustomCollection::class, $response['custom_collection']);
    }
666166
public function replaceCollector($collectorId, array $data = [])
	{
		return $this->sendRequest(
			$this->createRequest('PUT', sprintf('collectors/%s', $collectorId), [], $data)
		);
	}
1272616
public function get($smartCollectionId, array $params = array())
    {
        $endpoint = '/admin/smart_collections/'.$smartCollectionId.'.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createObject(SmartCollection::class, $response['smart_collection']);
    }
302105
public function send($url, Request\TrackingRequestCollection $requestCollection)
    {
        // get endpoint
        $endpoint = parse_url($url);

        $this->createConnection($endpoint);

        /** @var Request\TrackingRequest $request */
        while ($requestCollection->valid()) {
            $request = $requestCollection->current();
            $requestCollection->next();

            $this->writeHeader($endpoint, $request, !$requestCollection->valid());
            $responseHeader = $this->readConnection($request);

            $request->setResponseHeader($responseHeader);
        }
        // connection close
        socket_close($this->connection);

        return $requestCollection;
    }
325828
public function withCollection($collection, $transformer = null, $resourceKey = null)
    {
        return $this->respond(
            $this->getCollection($collection, $transformer, $resourceKey)
        );
    }