protected function createAccessor(
        $accessor,
        string $name,
        $value,
        array $context = []
    ): AccessorInterface {
        if (!is_string($accessor) || !class_exists($accessor)) {
            throw new EntityException(
                "Unable to create accessor for field `{$name}` in " . static::class
            );
        }

        //Field as a context
        return new $accessor($value, $context + ['field' => $name, 'entity' => $this]);
    }