You are here

public function Request::isListRequest in RESTful 7.2

Helper method to know if the current request is for a list.

Parameters

string $resource_path: The resource path without any prefixes.

Return value

boolean TRUE if the request is for a list. FALSE otherwise.

Overrides RequestInterface::isListRequest

File

src/Http/Request.php, line 228
Contains \Drupal\restful\Http\Request

Class

Request
Deals with everything coming from the consumer.

Namespace

Drupal\restful\Http

Code

public function isListRequest($resource_path) {
  if ($this->method != static::METHOD_GET) {
    return FALSE;
  }
  return empty($resource_path) || strpos($resource_path, ',') !== FALSE;
}