eZ\Publish\Core\REST\Server\Input\Parser\Limitation\RouteBasedLimitationParser::parseIdFromHref PHP Method

parseIdFromHref() protected method

protected parseIdFromHref ( $limitationValue ) : false | mixed
$limitationValue
return false | mixed
    protected function parseIdFromHref($limitationValue)
    {
        return $this->requestParser->parseHref($limitationValue['_href'], $this->limitationRouteParameterName);
    }

Usage Example

 /**
  * Prefixes the value parsed by the parent with a '/'.
  *
  * @throws \eZ\Publish\Core\REST\Common\Exceptions\Parser if the '_href' attribute doesn't end with a slash, since 6.4
  *
  * @param $limitationValue
  *
  * @return false|mixed
  */
 protected function parseIdFromHref($limitationValue)
 {
     if (substr($limitationValue['_href'], -1) !== '/') {
         throw new Exceptions\Parser("The '_href' attribute must end with a slash.");
     }
     return '/' . ltrim(parent::parseIdFromHref($limitationValue), '/');
 }