ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter::getIdFromValue PHP Method

getIdFromValue() protected method

Gets the ID from an IRI or a raw ID.
protected getIdFromValue ( string $value ) : mixed
$value string
return mixed
    protected function getIdFromValue(string $value)
    {
        try {
            if ($item = $this->iriConverter->getItemFromIri($value, ['fetch_data' => false])) {
                return $this->propertyAccessor->getValue($item, 'id');
            }
        } catch (InvalidArgumentException $e) {
            // Do nothing, return the raw value
        }
        return $value;
    }