public function Request::getPath in RESTful 7.2
Gets the request path.
Parameters
bool $strip: If TRUE it will strip the restful API prefix from the beginning.
Return value
string The path.
Overrides RequestInterface::getPath
File
- src/
Http/ Request.php, line 417  - Contains \Drupal\restful\Http\Request
 
Class
- Request
 - Deals with everything coming from the consumer.
 
Namespace
Drupal\restful\HttpCode
public function getPath($strip = TRUE) {
  // Remove the restful prefix from the beginning of the path.
  if ($strip && strpos($this->path, variable_get('restful_hook_menu_base_path', 'api')) !== FALSE) {
    return substr($this->path, strlen(variable_get('restful_hook_menu_base_path', 'api')) + 1);
  }
  return $this->path;
}