private function extractFields(array $params)
    {
        if (false === $this->issetNotEmpty(self::PARAM_FIELDSETS, $params)) {
            return $this;
        }
        $fields = $params[self::PARAM_FIELDSETS];
        if (!is_array($fields)) {
            throw RestException::invalidQueryParam(self::PARAM_FIELDSETS, 'The field parameter must be an array of entity type keys to fields.');
        }
        foreach ($fields as $entityType => $string) {
            $this->fields[$entityType] = explode(',', $string);
        }
        return $this;
    }
private function extractFields(array $params)
    {
        if (false === $this->issetNotEmpty(self::PARAM_FIELDSETS, $params)) {
            return $this;
        }
        $fields = $params[self::PARAM_FIELDSETS];
        if (!is_array($fields)) {
            throw RestException::invalidQueryParam(self::PARAM_FIELDSETS, 'The field parameter must be an array of entity type keys to fields.');
        }
        foreach ($fields as $entityType => $string) {
            $this->fields[$entityType] = explode(',', $string);
        }
        return $this;
    }
private function extractFields ( array $ params ) { if ( false === $ this -> issetNotEmpty ( self :: PARAM_FIELDSETS , $ params ) ) { return $ this ; } $ fields = $ params [ self :: PARAM_FIELDSETS ] ; if ( ! is_array ( $ fields ) ) { throw RestException :: invalidQueryParam ( self :: PARAM_FIELDSETS , 'The field parameter must be an array of entity type keys to fields.' ) ; } foreach ( $ fields as $ entityType => $ string ) { $ this -> fields [ $ entityType ] = explode ( ',' , $ string ) ; } return $ this ; }
Extracts fields to return from an array of query params.

@param   array   $params
@return  self
Extracts fields to return from an array of query params .