/**
  * {@inheritdoc}
  */
 public function negotiate()
 {
     $version = $this->getVersionFromRequest();
     list($resource_name, ) = static::getPageArguments($this->request->getPath(FALSE));
     try {
         $resource = $this->getPlugin($resource_name . PluginBase::DERIVATIVE_SEPARATOR . $version[0] . '.' . $version[1]);
         return $resource->isEnabled() ? $resource : NULL;
     } catch (PluginNotFoundException $e) {
         throw new ServerConfigurationException($e->getMessage());
     }
 }
 /**
  * Checks if the passed in request belongs to RESTful.
  *
  * @param RequestInterface $request
  *   The path to check.
  *
  * @return bool
  *   TRUE if the path belongs to RESTful.
  */
 public static function isRestfulPath(RequestInterface $request)
 {
     return ResourceManager::getPageCallback($request->getPath(FALSE)) == static::FRONT_CONTROLLER_CALLBACK;
 }