<?php

namespace interfaces;

interface ocr_space_i extends universal_module_i
{
    /**
     * Get the OCR result from the OCR Space API.
     * @param string $base64_image The base64 encoded image to be processed.
     */
    public function get_ocr_result(string $base64_image): array;
    /**
     * Cache the OCR result. (for 24 hours)
     * @param string $base64_image The base64 encoded image to be cached.
     * @param array $result The OCR result to be cached.
     * @return bool True if caching was successful, false otherwise.
     * @throws \Exception If there is an error during caching.
     */
}