The ObjectDescriptorInterface is the interface for components that contains logic to describe objects.
But you should be more interested in the SupportsObjectDescriptorInterface, which combined with ObjectDescriptor allow to have multiple object descriptor at once.
Example :
<?php
use Yokai\SafeDelete\Usage\Descriptor\ObjectDescriptor;
use Yokai\SafeDelete\Usage\Descriptor\SupportsObjectDescriptorInterface;
$descriptor = new ObjectDescriptor([
new class implements SupportsObjectDescriptorInterface {/* ... */},
new class implements SupportsObjectDescriptorInterface {/* ... */},
/* ... */
]);
echo $descriptor->describe($object); // some string
integration this library is shipped with adapters for symfony/translation, symfony/property-access
recipe if you wish to create your own object descriptor, please follow our recipe
« README