Gets the response body. If the response contains multiple records,
a ``Collection`` is returned.

@return array|Collection
487621
public function get()
    {
        return $this->isCollection($this->data)
            ? new Collection($this->data)
            : $this->data;
    }
126125
public function getResponse() {
        $class = $this->getResponseClassName();
        /** @var $response ResponseAbstract */
        $response = new $class;
        $response->setServiceLocator($this->getServiceLocator());
        $response->setException($this->exception)
            ->setHttpCode($this->returnHttpCode)
            ->trace();

        return $response;
    }
203787
protected function get_collection_from() {
        if ($this->collectionfrom === null) {
            $this->collectionfrom = api::search_competencies('', $this->from);
        }
        return $this->collectionfrom;
    }
787408
public function getCollectionAction()
    {
        if (!$this->isGranted('ROLE_API_USER')) {
            throw new AccessDeniedHttpException('Your account\'s api access is disabled');
        }
        $sitesAvailable = [];
        $sites = $this->getEntityManager()->getRepository('BackBee\Site\Site')->findAll();

        foreach ($sites as $site) {
            if ($this->isGranted('VIEW', $site)) {
                $sitesAvailable[] = $site;
            }
        }
        return new Response($this->formatCollection($sitesAvailable), 200,  ['Content-Type' => 'application/json']);
    }
1162450
public function getCollection()
    {
        $collection = trim(str_replace('\\', '_', $this->collection), '_');
        return $this->$collection()
            ->setDatabase($this->database)
            ->setTable($this->table)
            ->setModel($this->model)
            ->set($this->getRows());
    }
1365637
public function getBodyParameters() {
        $reqs = array();

        foreach ($this->requests as $r) {
            array_push($reqs, $this->requestToBatchArray($r));
        }

        $result = ['requests' => $reqs];

        if(isset($this->optional['distinctRecomms']))
            $result['distinctRecomms'] = $this->optional['distinctRecomms'];

        return $result;
    }
950268
public function body()
    {
        $columns = $this->_getColumns();

        $body = '';
        $body .= '<tbody>';
        if (empty($this->_collection)) {
            // No results if collection is empty
            $body .= '<tr><td colspan="'.count($columns).'">'.trans('resource-table::default.No_records').'</td></tr>';
        } else {
            foreach ($this->_collection as $row) {
                // Generate each row

                $body .= '<tr>';
                foreach ($columns as $column) {
                    // Generate each column

                    $body .= '<td>';
                    $body .= $column->content($row);
                    $body .= '</td>';
                }
                $body .= '</tr>';
            }
        }
        $body .= '</tbody>';

        return $body;
    }
607101
public function body()
	{
		$msg = $this->getMessage();
		
		if (422 == $this->getCode() && !empty($msg)) {
			$this->extra['errors'] = json_decode($msg, true);
			$msg = null;
		}
		
		if (empty($msg)) {
			switch ($this->getCode()) {
				case 404:
					$msg = 'Not Found';
					break;
				case 405:
					$msg = 'Method Not Allowed';
					break;
				case 400:
					$msg = 'Bad Request';
					break;
				case 401:
					$msg = 'Unauthorized';
					break;
				case 402:
					$msg = 'Payment Required';
					break;
				case 403:
					$msg = 'Forbidden';
					break;
				case 422:
					$msg = 'Unprocessable Entity';
					break;
				case 410:
					$msg = 'Resource Deleted';
					break;
				case 500:
					$msg = 'Server Error';
					break;
				default:
					$msg = 'Error';
			}
		}
		
		$output = array(
			'status'  => $this->getCode(),
			'message' => $msg,
		);
		
		if (!empty($this->getExtra())) {
			$output = array_merge($output, $this->getExtra());
		}
		
		return $output;
	}
46525
public function getRespondent()
    {
        return $this->loader->getRespondent(
                $this->getPatientNumber(),
                $this->getOrganizationId(),
                $this->getRespondentId())
            ;
    }
35674
public function get_array() {
	$response = array();
	
	// links
	if ($this->links) {
		$response['links'] = $this->links;
	}
	
	// primary data
	$response['data'] = $this->primary_collection;
	
	// included resources
	if ($this->included_data) {
		$response['included'] = array_values($this->included_data);
	}
	
	// meta data
	if ($this->meta_data) {
		$response['meta'] = $this->meta_data;
	}
	
	return $response;
}
86129
public function getVerboseResponse() 
    {
        $this->execute();
        
        if ($this->error) {
            return $this->error;
        }
        
        $contentType = $this->getContentType();
        
        $body = ($this->def['dataType'] == 'array' || strpos($contentType, 'json') !== false) ? static::data2json($this->responseText) : $this->responseText;
        
        return [
            'status'    => $this->status,
            'body'      => $body, 
            'info'      => $this->responseInfo,
            'header'    => $this->responseHeaders,
            'request_header'    => $this->getRequestHeaders(),
            'content_type'      => $contentType
        ];
    }
233340
public function get()
    {
        $query = $this->getCriteria();

        $args = func_get_args();
        if(empty($args)){
            $args = array("system");
        }

        $isCollection = !$this->isSingleOnly && count($args)==1;

        try {
            $response = $this->client->request($this, 'get', $args, array(), $query);
        } catch(ClientException $ex) {
            throw new Resource\Exception\CommunicationException($ex->getMessage(), $ex);
        }

        return $this->transformResponse($response, $isCollection);
    }
1186902
private function &getCollection()
    {
        if (null === $this->collection) {
            $qb = $this->createAndFilterQueryBuilder($this->getEntityAlias());
            if ($this->isHydrationDisabled()) {
                $this->collection = $qb->getQuery()->getScalarResult();
            } else {
                $this->collection = $qb->getQuery()->getResult();
            }
        }
        return $this->collection;
    }
363099
public function collections()
    {
        if (!$this->collections) {
            $this->collections = [];

            /** @var \record_adapter $record */
            foreach ($this as $record) {
                if (! isset($this->collections[$record->getBaseId()])) {
                    $this->collections[$record->getBaseId()] = $record->get_collection();
                }
            }

            $this->collections = array_values($this->collections);
        }

        return $this->collections;
    }
712550
public function getRequestBody()
    {
        $body = [
            'status' => $this->getContent(),
        ];

        if ($this->imageIds) {
            $body['media_ids'] = $this->imageIds->implode(',');
        }

        return $body;
    }
852486
public function getCollectionData()
    {
        $returnList = array();
        switch( $this->ContentObjectAttribute->attribute( 'data_type_string' ) )
        {
            case 'ezobjectrelation':
            {
                $returnList = $this->getBaseList( $this->ContentObjectAttribute->attribute( 'object_version' ) );
            } break;

            case 'ezobjectrelationlist':
            {
                $content = $this->ContentObjectAttribute->content();
                foreach ( $content['relation_list'] as $relationItem )
                {
                    $subObjectID = $relationItem['contentobject_id'];
                    if ( !$subObjectID )
                        continue;
                    $subObject = eZContentObjectVersion::fetchVersion( $relationItem['contentobject_version'], $subObjectID );
                    if ( !$subObject )
                        continue;

                    $returnList = array_merge( $this->getBaseList( $subObject ),
                                               $returnList );
                }
            } break;
        }

        return $returnList;
    }
1218365
public function getCollection()
    {
        return $this->resolve(Collection::class)
            ->setDatabase($this->database)
            ->setTable($this->table)
            ->set($this->getRows());
    }