Guides
Tutorials
Guesses which resource is associated with a given object.
interface ApiPlatform\Metadata\ResourceClassResolverInterface
{
public getResourceClass($value, null|string $resourceClass, bool $strict): string
public isResourceClass(string $type): bool
}interface ApiPlatform\Metadata\ResourceClassResolverInterface
{
public getResourceClass($value, null|string $resourceClass, bool $strict): string
public isResourceClass(string $type): bool
}Guesses the associated resource.
public getResourceClass($value, null|string $resourceClass, bool $strict): stringpublic getResourceClass($value, null|string $resourceClass, bool $strict): string| value | ||
| resourceClass | string | The expected resource class |
| strict | bool | If true, value must match the expected resource class |
string
Is the given class a resource class?
public isResourceClass(string $type): boolpublic isResourceClass(string $type): bool| type | string |
bool